[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: Errata for IEEE 754-2008 -- precision 1
On 2009-03-31 23:49:41 -2000, Michel Hack wrote:
Vincent Lef?vre replied:
I did not consider taking the parity of the exponent into account,
and I think this is useless in practice. AFAIK, the only advantage
of such a choice would be to balance round-up with round-down, as
you said. But this is a nice feature only for arithmetic formats.
For output, this is not needed and would be a bit awkward, IMHO.
Well, 754-2008 does not say anything about binary output -- only
about decimal and hexadecimal. Does MPFR support binary strings?
Yes, MFPR can output in bases from 2 to 36 (62 for the most recent
versions, at least in the trunk). The most used ones are 2, 10 and
16. With mpfr_printf, only 2 (with the %b extension), 10 (standard
%e, %f, %g) and 16 (standard %a).
I thought that the issue of binary precision 1 did occur in the
arithmetic context of mpfr (as a degenerate case perhaps), which
was dealt with by bounding the precision to 2 from below.
For the MPFR numbers (similar to arithmetic formats), the precision
is at least 2 (currently, and I don't think it is useful to change the
minimal precision to 1, even though we can have a good specification).
The only reason I brought it up is because Vincent wrote, in his first
post on the subject:
... I suggest that one should consider the exponent of the
value that is closer to 0, then consider the significands
He did indeed not mention exponent parity, and I actually misunderstood
what he meant in that sentence (and still do, but never mind).
Note: "that is closer to 0" can only refer to "the value" (and not
"the exponent"), otherwise the value would not be determined.
Since the reason given in 1985 for round-to-nearest-even was to
balance round-up with round-down, I figured that the case of binary
precision 1 needed to be examined in this light too, for completeness.
I don't think we should do anything about it however.
Here is a serious follow-up question: if we take the position that FP
values follow a more-or-less logarithmic distribution, what was the
rationale for "balancing" rounding up or down for linear-exact midpoints?
Anyway, was the "balancing" the main reason? I prefer the fact that
the result in a halfway case fits on p-1 bits.
There's also the stability of (x + 1) - 1. But that's very particular.
--
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)