Macaulay2 » Documentation
Packages » Macaulay2Doc :: truncate(Number)
next | previous | forward | backward | up | index | toc

truncate(Number) -- round a number toward zero

Synopsis

Description

The given number is rounded toward zero.

i1 : truncate 3.7

o1 = 3
i2 : truncate(-3.7)

o2 = -3

For complex numbers, the real part is truncated.

i3 : truncate(2.5 + ii)

o3 = 2

See also

Ways to use this method: