Truncation - Truncation and Floor Function

Truncation and Floor Function

Truncation of positive integer 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 is

However, for negative numbers truncation does not round in the same direction as the floor function: truncation always rounds toward zero, the floor function rounds towards negative infinity.

Read more about this topic:  Truncation

Famous quotes containing the words floor and/or function:

    The distant box is open. A sound of grain
    Poured over the floor in some eagerness we
    Rise with the night let out of the box of wind.
    John Ashbery (b. 1927)

    Advocating the mere tolerance of difference between women is the grossest reformism. It is a total denial of the creative function of difference in our lives. Difference must be not merely tolerated, but seen as a fund of necessary polarities between which our creativity can spark like a dialectic.
    Audre Lorde (1934–1992)