https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61399

--- Comment #8 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
It seems that the choice emin = -968, emax = 1024, p = 106 had been made
originally because all normalized values in this floating-point system (as
specified by 5.2.4.2.2p2) are representable as a sum of two double's (and even
two non-overlapping double's). However, the mistake is that not all pairs of
double's are valid in the type "long double" (as you can see with the LDBL_MAX
value). If only valid pairs are considered, then possible choices are:

* emin = -968, emax = 1024, p = 53 (but a poor choice as it would appear that
this is no better than the type double);

* emin = -968, emax = 1023, p = 106 (thus just decrease emax from the current
parameters);

* emin = -967, emax = 1023, p = 107 (I think that this would be a better
choice). The extra bit precision comes from the sign of the second double.

Reply via email to