next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc :: truncate(Number)

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: