[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



In a separate e-mail exchange with Dan Zuras and Mike Cowlishaw, I had
proposed the following clarification for clause 4.3.1:

   ...; if the two nearest floating-point numbers bracketing
   an unrepresentable infinitely precise result are equally
   near, the one with an even least significant digit shall
   be delivered; if that is not possible, the one larger in
   magnitude shall be delivered (this may happen for one-digit
   precision, possible with convertToDecimalCharacter for example).

Vincent LefÛvre wrote:
And, in any case, would 9.5e-2 be rounded in a different direction
than 9.5e1, because the bracketing values are in the opposite order
relative to exponent zero? (Note that this case is only possible
with DFP.)

I don't understand what you mean. They are not in opposite order.

Well, for 9.5 the bracketing values are 9e0 and 1e1, so 10e0 is the
even one with the common exponent.  For 0.95 the bracketing values
are 9e-1 and 1e0, so the common exponent would be 1e0, and neither
1e0 nor .9e0 is even.  That's why I don't understand the "relative
to exponent 0" part.  But I think we have a solution to 754-2008
4.3.1 -- and MPFR can drop the funny rule for p=1.

Michel.
Sent: 2009-03-26 13:55:23 UTC


754 | revision | FAQ | references | list archive