Investment Studio > Expressions > Functions > Math & Trig > ROUND

float round(float number, integer digits)

Returns the number rounded to the specified number of digits.

If digits >= 0, number is rounded to digits decimal places.

If digits < 0, number is rounded digits places left of the decimal point.

Examples

=round(1.15, 1)

equals 1.2

=round(1.149, 1)

equals 1.1

=round(11.2, 0)

equals 11

=round(11.2, -1)

equals 10 (11.2 rounded one place left of the decimal point).

See also ceiling, even, floor, frac, int, mround, odd, rounddown, roundup, trunc.