Even/Odd rounding
Author Message
Even/Odd rounding

Consider:

numeric digits 9
say 0 + 888888888.5000000000xxxx000000001

(where xxxx is an arbitrary number of zeros).  This number should
always be rounded up, never down, as should:

say 0 + 888888888.59999999xxxx9999999

(where xxxx is an arbitrary number of nines).  In other words, the
even/odd rule can only be applied if you have inspected all digits
to the right and confirmed that they are zeros.  If you do inspect
them, then your results are influenced by more than DIGITS()+1
digits, and hence don't follow the principles of NUMERIC DIGITS.
If you don't inspect them, then quite large errors occur (as in the
second case above).

Mike

Sun, 04 Jun 1995 18:06:22 GMT
Even/Odd rounding
Thanks for the clarification, Mike.  Both rounding systems have anomalies.
But only one has bias.  I am just arguing for a bias-free system, not one
without anomalies.  Dave

Seven Gateview Court, San Francisco CA 94116-1941      voice-> (415)731-7793

Sun, 04 Jun 1995 16:25:36 GMT
Even/Odd rounding

|> Consider:
|>
|>   numeric digits 9
|>   say 0 + 888888888.5000000000xxxx000000001
|>
|> (where xxxx is an arbitrary number of zeros).  This number should
|> always be rounded up, never down, as should:
|>
|>   say 0 + 888888888.59999999xxxx9999999
|>
|> (where xxxx is an arbitrary number of nines).  In other words, the
|> even/odd rule can only be applied if you have inspected all digits
|> to the right and confirmed that they are zeros.  If you do inspect
|> them, then your results are influenced by more than DIGITS()+1
|> digits, and hence don't follow the principles of NUMERIC DIGITS.
|> If you don't inspect them, then quite large errors occur (as in the
|> second case above).
|>
|> Mike

numeric digits 9
say 0 + 888888888.5000000000xxxx00000000Z

where the last character is is in fact the letter "Z".  This should
fail, as we no longer have a valid number.  So it seems to me that we
always have to inspect all of the digits anyway, so where is the harm
in using even/odd rounding?

--
John Brock
uunet!csfb1!jbrock

Wed, 07 Jun 1995 00:53:11 GMT

 Page 1 of 1 [ 3 post ]

Relevant Pages