[PATCH] Update sparc ULPs.
David Miller
davem@davemloft.net
Wed Aug 8 03:52:00 GMT 2012
From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Sat, 28 Jul 2012 17:24:12 +0000
> On Fri, 27 Jul 2012, David Miller wrote:
>
>> I've been getting some weird long-double unexpected underflow for
>> yn() for a week or two, and I plan to look into that soon. It's
>> probably yet another soft-fp issue, sigh...
>
> There are quite a lot of Bessel function tests that get spurious underflow
> in some cases (generally marked as UNDERFLOW_EXCEPTION_OK with comments
> pointing to bug 14155 until they are properly fixed - I think there are
> several cases in the various implementations that need to use simpler
> approximations for certain arguments to avoid intermediate computations
> underflowing). Though I don't know why such a failure would newly appear.
The first new failure is in clog10l() and is definitely introduced by
changes made in commit da865e95bcf9a5365de78fa6b5c681aca0a1bb46.
It's for this libm-test.inc test:
TEST_c_c (clog10, 0x1p-8189L, 1.0L, 1.168114274114528946314738738025008370069e-4931L, 6.821881769209206737428918127156778851051e-1L);
This generates an underflow exception on sparc for long double.
GLIBC before the commit does not generate the underflow exception.
Here is the test case I used:
#include <complex.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <fenv.h>
int main(void)
{
__complex__ long double x, y;
fenv_t env_before;
fenv_t env_after;
__real__ x = 0x1p-8189L;
__imag__ x = 1.0L;
fegetenv(&env_before);
y = clog10l(x);
fegetenv(&env_after);
printf("%LE:%LE\n", __real__ y, __imag__ y);
printf("BEFORE [%08lx]\n", env_before);
printf("AFTER [%08lx]\n", env_after);
return 0;
}
Before the commit clog10l() generates an inexact exception, afterwards
that commit we get an underflow as well as inexact.
More information about the Libc-alpha
mailing list