Skip to main content

Round

Round (Function)​

Format​

round ( Numeric_expression )
round ( Numeric_expression, Integer_expression )\

return Numeric_expression

Description​

This function rounds a floating point number. The optional second argument (an integer) defines how many decimal places to round to.

Example​

a = 3.1415926535
print round(a)
print round(a,1)
print round(a,2)
print round(a,3)
print round(a,4)

3.0
3.1
3.14
3.142
3.1416

See Also​

Abs, Acos, Asin, Atan, Ceil, Cos, Degrees, Exp, Float, Floor, Int, IsNumeric, Log, Log10, Radians, Rand, Round, Seed, Sin, Sqr, Tan

History​

2.0.0.0New To Version