Macaulay2 » Documentation
Packages » RInterface » RObject » truncate(RObject)
next | previous | forward | backward | up | index | toc

truncate(RObject) -- truncation of an R object

Description

Round each element of x toward zero, calling R's trunc.

i1 : x = RObject exp 1

o1 = [1] 2.718282

o1 : RObject of type double
i2 : truncate x

o2 = [1] 2

o2 : RObject of type double
i3 : truncate(-x)

o3 = [1] -2

o3 : RObject of type double

See also

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/RInterface/doc/rounding.m2:77:0.