Fix strtod rounding of half the least subnormal (bug 16151)
Ondřej Bílka
neleai@seznam.cz
Wed Nov 13 10:20:00 GMT 2013
On Mon, Nov 11, 2013 at 06:45:43PM +0000, Joseph S. Myers wrote:
> This patch fixes bug 16151, incorrect strtod handling of inputs that
> are exactly plus or minus half the least subnormal, for
> round-to-nearest. In this case, the caller of round_and_return
> computes a MANT_DIG-bit mantissa, all of which needs shifting out, and
> the computation of whether any bits were set in that mantissa wrongly
> tests the high-order limb (this limb gets used as round_limb, so the
> relevant subset of bits in it get handled later, so this loop can
> completely ignore it when setting more_bits). This patch makes the
> required adjustment to the loop; the other shift case with such a loop
> is already correct. Tested x86_64 and x86.
>
looks ok
More information about the Libc-alpha
mailing list