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

truncate(Number) -- round a number toward zero

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:


The source of this document is in Macaulay2Doc/functions/truncate-doc.m2:26:0.