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:
“Dont you know there are 200 temperance women in this county who control 200 votes. Why does a woman work for temperance? Because shes tired of liftin that besotted mate of hers off the floor every Saturday night and puttin him on the sofa so he wont catch cold. Tonight were for temperance. Help yourself to them cloves and chew them, chew them hard. Were goin to that festival tonight smelling like a hot mince pie.”
—Laurence Stallings (18941968)
“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 (19051975)