TRUNC

ExtrAXION

 

TRUNC

Truncates a number to an integer by removing the decimal (or fractional) part of the number.

 Syntax

TRUNC(number;num_digits)

Number is the number whose decimal digits you wish to truncate.

Num_digits is the number of decimal digits that remain after the truncation.

The default value of the entry num_digits is 0 (zero).

Comment

The TRUNC and INT functions are similar, as both return an integer. The TRUNC function removes the decimal part of a number, while the INT function rounds the number down, to the closest integer, based on the number’s decimal part. The INT function is different from the TRUNC function only in the handling of negative numbers: The formula TRUNC(-4,3) returns the value -4, while the formula INT(-4,3) returns the value -5, because -5 is the nearest downward integer.