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:
“Before she has her floor swept
Or her dishes done.
Any day youll find her
A-sunning in the sun!”
—Edna St. Vincent Millay (18921950)
“Philosophical questions are not by their nature insoluble. They are, indeed, radically different from scientific questions, because they concern the implications and other interrelations of ideas, not the order of physical events; their answers are interpretations instead of factual reports, and their function is to increase not our knowledge of nature, but our understanding of what we know.”
—Susanne K. Langer (18951985)