Contents - Index


ROUND

 

The ROUND function will accept one or two arguments.  If one argument is provided, ROUND(Arg) will return a value equal to the nearest integer value of the argument.  For example, 

 

X=round(2.8) 

 

will set X to 3

 

Round(Arg) differs from Ceil(Arg) when the argument is negative.  For example

 

X=round(-2.8)

Y=ceil(-2.8)

 

X will be set to -3 whereas Y will be set to -2.

 

If two arguments are provided, the first argument will be rounded to the nearest multiple of the second argument.  For example

 

D=round(19.345, 0.1) 

 

will set D to 19.3

 

F=round(8.352,0.02)

 

will set F to 8.36.

 

(The Round function calls the Round2 function when two arguments are provided.)

 

See also: 

 CEIL  

 TRUNC  

 FLOOR

 Mathematical functions