Algosim documentation: round

round

Rounds to the nearest integer.

Syntax

Description

If x is a real number, then round(x) is the nearest integer. If two integers are at the same distance from x, the even one is returned.

Examples

round(π)
3
round(e)
3
round(−π)
−3
round(−e)
−3

See also