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: [PATCH] PowerPC: Fix for strtold overflow handling (bz14551)


On Wed, 12 Sep 2012, Adhemerval Zanella wrote:

> The patch fixes it, making strtold correct returning infinity number for 
> these cases. I adjusted the testcase to check on error for IBM long 
> double as well.

No, this testcase change is not correct.  The "ld106exact" field is 
specifically so that the test tests the *interface* rather than *details 
of the current implementation* - for many inexact values, the test result 
given for IBM long double in tst-strtod-round is *not* the best result, 
because it's rounded to 106 bits, and ideally the result would allow for 
the discontiguous mantissa bits and round to the nearest value (in the 
appropriate direction) that in fact is representable as long double.  The 
testcase is designed so that it would still pass with such a better 
implementation.

You need to add a separate testcase for this separate bug.

You don't seem to have done anything about my other points about your 
patch (that in some cases it will leave an incorrect nonzero mantissa in 
the low part, and that errno won't be set to ERANGE).  Again, a separate 
testcase should cover these issues.

-- 
Joseph S. Myers
joseph@codesourcery.com


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