These functions round RObject's representing numbers in specific ways.
ceiling and floor do the expected thing, calling the corresponding R function to round up or down, respectively.
|
|
|
truncate calls R's trunc function to round toward 0.
|
|
round calls the corresponding R function, which rounds to even, just as in Macaulay2.
|
|
It may also be called with a second argument, or equivalently, a digits option, specifying the number of decimal places to be used when rounding.
|
|