Floating Point Arithmetic Operations
The usual rule for performing floating point arithmetic is that the exact mathematical value is calculated, and the result is then rounded to the nearest representable value in the specified precision. This is in fact the behavior mandated for IEEE-compliant computer hardware, under normal rounding behavior and in the absence of exceptional conditions.
For ease of presentation and understanding, 7 digit precision will be used in the examples. The fundamental principles are the same in any precision.
Read more about this topic: Decimal Floating Point
Famous quotes containing the words floating, point, arithmetic and/or operations:
“People who treat other people as less than human must not be surprised when the bread they have cast on the waters comes floating back to them, poisoned.”
—James Baldwin (19241987)
“Taking the childs point of view demands good will, time, and effort on the part of parents. The child is the clear beneficiary. Parents who make the effort to understand their childrens point of view are likely to treat children fairly and in an age-appropriate manner.”
—David Elkind (20th century)
“I hope I may claim in the present work to have made it probable that the laws of arithmetic are analytic judgments and consequently a priori. Arithmetic thus becomes simply a development of logic, and every proposition of arithmetic a law of logic, albeit a derivative one. To apply arithmetic in the physical sciences is to bring logic to bear on observed facts; calculation becomes deduction.”
—Gottlob Frege (18481925)
“It may seem strange that any road through such a wilderness should be passable, even in winter, when the snow is three or four feet deep, but at that season, wherever lumbering operations are actively carried on, teams are continually passing on the single track, and it becomes as smooth almost as a railway.”
—Henry David Thoreau (18171862)