Math problems on PPC with gcc-2.96 20000928
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Sat Sep 30 07:02:00 GMT 2000
Hi,
since a while I have math testsuite failures with mainline gcc, test-double
and test-idouble fail with:
testing double (without inline functions)
Failure: Test: tan (0.7) == 0.84228838046307944813
Result:
is: 8.42639198734796535106e-01
0x1.af6e67b1c985600000000000000000000p-1
should be: 8.42288380463079411342e-01
0x1.af406c2fc78ae00000000000000000000p-1
difference: 3.50818271717123764120e-04
0x1.6fdc100fd400000000000000000000000p-12
ulp : 3159890075560.0000
max.ulp : 0.0000
Maximal error of `tan'
is : 3159890075560.0000 ulp
accepted: 1.0000 ulp
Failure: Test: pow (0.7, 1.2) == 0.65180494056638638188
Result:
is: 7.75054287150474419121e-01
0x1.8cd3ea5fdf2bc00000000000000000000p-1
should be: 6.51804940566386381562e-01
0x1.4db9608e352c400000000000000000000p-1
difference: 1.23249346584088037559e-01 0x1.f8d44e8d4ffc000000000000000000000p-4
ulp : 1110131422699512.0000
max.ulp : 0.0000
Maximal error of `pow'
is : 1110131422699512.0000 ulp
accepted: 0.0000 ulp
Test suite completed:
2475 test cases plus 2267 tests for exception flags executed.
4 errors occured.
The pow problems go away if sysdeps/ieee754/dbl-64/e_pow.c is compiled with
-O1, haven't found the miscompiled routine for tan yet. Is anyone else seeing
this? I'll try to find the bug(s) in gcc, but I'm a bit unfamiliar with math
in gcc, so it may take a while.
Another problem showed up during test-float, but this was caused by an
oversight while making glibc aliasing safe, fixed by the attached patch.
Franz.
* sysdeps/ieee754/flt-32/s_frexpf.c: Make it aliasing safe.
More information about the Libc-alpha
mailing list