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

Re: roundTiesToEven in precision 1



On 2009-03-26 11:12:23 +0100, Vincent Lefevre wrote:
On 2009-03-25 21:00:49 -2000, Michel Hack wrote:
Vincent actually mentioned taking the exponent into account:
   ... I suggest that one should consider the exponent of the
   value that is closer to 0, then consider the significands
   of both bracketing values, and choose the even one.  With
   the above example, the exponent of b-1 would be chosen,
   i.e. 0; then the significands are respectively b-1 and b,
   and the result b should be returned since b is even.

I'm not sure I understand this.  First of all, b cannot be a value
of a 1-digit significand.

I considered the significand as an integer, without the constraints
on its range (like what has been said above, probably in a better
way).

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.

Note that "that is closer to 0" applied to the value, not the
exponent. This is also equivalent to choose the exponent of the
unrounded value, and express the significands of the bracketing
values with this chosen exponent.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


754 | revision | FAQ | references | list archive