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:

    Don’t you know there are 200 temperance women in this county who control 200 votes. Why does a woman work for temperance? Because she’s tired of liftin’ that besotted mate of hers off the floor every Saturday night and puttin’ him on the sofa so he won’t catch cold. Tonight we’re for temperance. Help yourself to them cloves and chew them, chew them hard. We’re goin’ to that festival tonight smelling like a hot mince pie.
    Laurence Stallings (1894–1968)

    The function of literature, through all its mutations, has been to make us aware of the particularity of selves, and the high authority of the self in its quarrel with its society and its culture. Literature is in that sense subversive.
    Lionel Trilling (1905–1975)