Round up to the higher point 5
1 2 3 4 5 6 7 8 9 10 11 | * Round up to the highest .5. * Ray. DATA LIST FREE /var1(F8.3). BEGIN DATA 1.01 1.49 1.5 1.501 1.67 1.99 END DATA. LIST. COMPUTE var2=TRUNC((var1+.49999)*2)/2. EXECUTE. |
1 2 3 4 5 6 7 8 9 10 11 | * Round up to the highest .5. * Ray. DATA LIST FREE /var1(F8.3). BEGIN DATA 1.01 1.49 1.5 1.501 1.67 1.99 END DATA. LIST. COMPUTE var2=TRUNC((var1+.49999)*2)/2. EXECUTE. |