[PATCH] Update sparc ULPs.
David Miller
davem@davemloft.net
Sun Nov 18 23:39:00 GMT 2012
From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Sun, 18 Nov 2012 23:33:41 +0000
> On Sun, 18 Nov 2012, David Miller wrote:
>
>> I've done some investigation meanwhile and we end up down in
>> atanl(), via atan2l().
>>
>> atan2l: x[-2.083218e+306L] y[1.755781e+174L]
>>
>> atanl: x[-7.672687e+306L]
>>
>> And the atanl() is what generates the spurious underflow.
>
> I don't know if this is an "atan of large argument" issue, but I see we
> don't have any direct tests in the testsuite for atan / atan2 of large
> finite arguments at all. Maybe we should have tests of atan (+/-
> max_value) and atan2 (+/- max_value, +/-min_value) - expected results all
> being +/- M_PI_2l. And for that matter, atan2 (+/- min_value, max_value),
> expected results +/- M_PIl, to verify that that doesn't produce any
> spurious underflows either (as it would for a naive conversion from atan2
> to atan).
Yes, this is exactly what the issue is here, and I have a patch
I'm testing which returns {+,-}pi/2 immediately for large values
instead of trying to compute the polynomial.
I'll add some tests too.
More information about the Libc-alpha
mailing list