Truncation
In mathematics and computer science, truncation is limiting the number of digits right of the decimal point.
Truncation and floor function
Truncation of positive real numbers can be done using the floor function. Given a number to be truncated and, the number of elements to be kept behind the decimal point, the truncated value of x isHowever, for negative numbers truncation does not round in the same direction as the floor function: truncation always rounds toward zero, the function rounds towards negative infinity. For a given number, the function is used instead