[seqfan] Re: Rounding in A075465
mlb at well.com
Wed Oct 7 19:16:13 CEST 2015
>="Harvey P. Dale" <hpd at hpdale.org>
> A quick on-line search for rules about rounding disclosed no consensus about
> whether the fraction 1/2 should be rounded up or down.
Rounding is literally a bottomless pit. To paraphrase Wikipedia's pretty
good entry for Rounding, "From the undecidability of the halting problem,
there exist computable numbers for which a rounded value can never be
determined no matter how many digits are calculated."
Nonetheless, I believe round-half-to-even is nowadays the most generally
used default rounding rule, in part because it distributes rounding errors,
Attesting to this ubiquity its other names include (again per Wikipedia)
unbiased rounding, convergent rounding, statistician's rounding, Dutch
rounding, Gaussian rounding, oddeven rounding, or bankers' rounding.
It is the default recommended by the IEEE 754 "Standard for Floating Point
So, absent other considerations, it's probably one's best default choice
(and presumably this is why Mathematica adopts it).
That said, it is perfectly fine to use other rounding rules if desired, (and
indeed systems based for example on IEEE may support a diversity of rounding
"modes") -- as long as the rounding rule being applied is clearly specified.
But round-to-half-even should probably be the default mode.
More information about the SeqFan