by ssi
8. January 2016 08:39
Round half to even
A tie-breaking rule that is less biased is round half to even, namely:
- If the fraction of y is 0.5, then q is the even integer nearest to y.
Thus, for example, +23.5 becomes +24, as does +24.5; while −23.5 becomes −24, as does −24.5.
This method treats positive and negative values symmetrically, and is therefore free of sign bias. More importantly, for reasonable distributions of y values, the expected (average) value of the rounded numbers is the same as that of the original numbers. However, this rule will introduce a towards-zero bias when y − 0.5 is even, and a towards-infinity bias for when it is odd.
This variant of the round-to-nearest method is also called unbiased rounding, convergent rounding, statistician's rounding, Dutch rounding, Gaussian rounding, odd–even rounding,[3] or bankers' rounding.
This is the default rounding mode used in IEEE 754 computing functions and operators.
by ssi
30. April 2013 18:36
We are setting up this blog to keep snippets of c# code and MS SQL script that we develop over the years for our clients. I just hope I can keep politics out of my posts.
823a34b9-ecb9-46fd-ac6a-fa3bf67c4545|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags: Notes