next
|
previous
|
forward
|
backward
| up |
top
|
index
|
toc
|
home
round -- round a number to the nearest integer
Synopsis
Usage:
round x
Inputs:
x
, a number
Outputs:
the integer nearest to
x
Description
i1 : round(-2.3) o1 = -2
i2 : round(2/3) o2 = 1
See also
floor
-- floor function
ceiling
-- ceiling function
Code
-- ../m2/reals.m2:49 round = x -> floor(x + 0.5)