round

Rounds a decimal value to the specified number of decimal places.

Function

result = round(value, precision)

Arguments

ArgumentData Type
valuenumeric
precisionnumeric
resultdecimal

Comments

If a number is halfway between two rounding values then the result rounds away from zero. For example, if -3.65 is rounded to one decimal place then the result will be -3.7.

Examples

result = round(18.3333333, 2) /* result = 18.33 */