Rounding - Double Rounding

Double Rounding

Rounding a number twice in succession to different precisions, with the latter precision being coarser, is not guaranteed to give the same result as rounding once to the final precision except in the case of directed rounding. For instance rounding 9.46 to one decimal gives 9.5, and then 10 when rounding to integer using rounding half to even, but would give 9 when rounded to integer directly.

In the cases in the US from 1995 to 1997 of Martinez versus Allstate and Sendejo versus Farmers the insurance companies argued that double rounding premiums was permissible and in fact required. The cases were decided against the insurance companies and they were ordered to adopt rules to ensure single rounding.

Some computer languages and the IEEE 754-2008 standard dictate that in straightforward calculations the result should not be rounded twice. This has been a particular problem with Java as it is designed to be run identically on different machines, special programming tricks have had to be used to achieve this with x87 floating point. The Java language was changed to allow different results where the difference does not matter and require a strictfp qualifier to be used when the results have to conform accurately.

Read more about this topic:  Rounding

Famous quotes containing the words double and/or rounding:

    You know, when these New Negroes have their convention—that is going to be the chairman of the Committee on Unending Agitation. Race, race, race!... Damn, even the N double A C P takes a holiday sometimes!
    Lorraine Hansberry (1930–1965)

    People forget that it is the eye that makes the horizon, and the rounding mind’s eye which makes this or that man a type or representative of humanity with the name of hero or saint.
    Ralph Waldo Emerson (1803–1882)