Trunc

Description

Truncates the argument X to the number of decimal places specified by d.

Syntax

Trunc ( X, d )

Arguments

X is a double

d is an integer

Remarks

For example, Trunc(12.345, 1) returns 12.3. The value of d can be negative in which case it refers to the number of decimal places to the left of the decimal point. Trunc(12.345, -1) returns 10. d is optional and if missing is assumed to be zero.