
trunc - truncates a number

Calling sequence:
trunc(expr)

Parameter:

expr   --  expression

Overloading:

all

Summary:

trunc returns the integral part of expr if the argument is a real number.

The function returns an error if the argument is a complex number. if the
argument cannot be evaluated to a number, trunc returns the unevaluated
function call.

If the exponents of real numbers are very large then a call of trunc can lead
to a loss of accuracy that is not identified as an error. trunc is a converting
function of the kernel.

>>  trunc(8/3);

     2

>>  trunc(-2.6);

      -2

See also:  frac, ceil, round , floor

