This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix strtod rounding of half the least subnormal (bug 16151)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]