This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Set up errno properly for yn
On Mon, 28 May 2012, Marek Polacek wrote:
> This is what I have right now. But it still isn't applicable, I'm
> afraid, because I had to guard the errno test with #ifndef TEST_LDOUBLE.
> If I don't do this, I get failures:
In such a case:
* You've found a separate bug in the course of fixing a bug. So file it
in Bugzilla so people can find it there as a known bug.
* When adding a test that's disabled for TEST_LDOUBLE because of that
separate bug, include a comment by the disabling that references "bug
NNNNN" for whatever the number is, so it's easy to find and removing the
disabling when the separate bug is fixed.
> testing long double (without inline functions)
> Failure: yn (10, min_value) == -inf: Exception "Invalid operation" set
> Failure: Test: yn (10, min_value) == -inf
> Result:
> is: -nan -nan
> should be: -inf -inf
My guess is that the overflow of yn has involved an internal computation
such as Inf - Inf or Inf / Inf that generated NaNs. It looks rather like
the ynl code that tries to stop this happening is confused about
GET_LDOUBLE_WORDS, which appears to set the sign+exponent value to a
*sign-extended* value (so 0xffffffff not 0xffff for -Inf).
--
Joseph S. Myers
joseph@codesourcery.com