This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
alpha: cpow math testsuite failures with GCC 9
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: libc-alpha at sourceware dot org
- Cc: Richard Henderson <rth at redhat dot com>
- Date: Sun, 1 Sep 2019 23:46:06 +0200
- Subject: alpha: cpow math testsuite failures with GCC 9
Hi,
When building the GNU libc with GCC 9 on alpha, there are a few new math
testsuite failures. Among them, I have been investigating the following
ones:
| FAIL: math/test-double-cpow
| FAIL: math/test-double-finite-cpow
| FAIL: math/test-float-cpow
| FAIL: math/test-float-finite-cpow
| FAIL: math/test-float32-cpow
| FAIL: math/test-float32-finite-cpow
| FAIL: math/test-float32x-cpow
| FAIL: math/test-float32x-finite-cpow
| FAIL: math/test-float64-cpow
| FAIL: math/test-float64-finite-cpow
| FAIL: math/test-idouble-cpow
| FAIL: math/test-ifloat-cpow
| FAIL: math/test-ifloat32-cpow
| FAIL: math/test-ifloat32x-cpow
| FAIL: math/test-ifloat64-cpow
Here is the detailed failure for math/test-double-cpow:
| FAIL: math/test-double-cpow
| original exit status 1
| testing double (without inline functions)
| Failure: Test: Real part of: cpow_downward (0x2p+0 + +0 i, 0xap+0 + +0 i)
| Result:
| is: 1.0239999999999989e+03 0x1.ffffffffffff7p+9
| should be: 1.0240000000000000e+03 0x1.0000000000000p+10
| difference: 1.0231815394945442e-12 0x1.2000000000000p-40
| ulp : 4.5000
| max.ulp : 2.0000
| Maximal error of real part of: cpow_downward
| is : 5 ulp
| accepted: 2 ulp
| Maximal error of imaginary part of: cpow_downward
| is : 1 ulp
| accepted: 1 ulp
| Failure: Test: Real part of: cpow_towardzero (0x2p+0 + +0 i, 0xap+0 + +0 i)
| Result:
| is: 1.0239999999999989e+03 0x1.ffffffffffff7p+9
| should be: 1.0240000000000000e+03 0x1.0000000000000p+10
| difference: 1.0231815394945442e-12 0x1.2000000000000p-40
| ulp : 4.5000
| max.ulp : 2.0000
| Maximal error of real part of: cpow_towardzero
| is : 5 ulp
| accepted: 2 ulp
| Maximal error of imaginary part of: cpow_towardzero
| is : 1 ulp
| accepted: 1 ulp
|
| Test suite completed:
| 50 test cases plus 46 tests for exception flags and
| 46 tests for errno executed.
| 4 errors occurred.
cpow(x, c) is basically cexp(c * clog(x)). The change is in the way the
rounding in done in the complex muliplication.
There have been 2 changes in that regard in GCC 9:
- r268430: config/alpha/t-linux: Add -mfp-rounding-mode=d
to HOST_LIBGCC2_CFLAGS.
- r259889: [tree-complex.c] PR tree-optimization/70291: Inline
floating-point complex multiplication more aggressively.
The first one changes the muldc3 routine in libgcc to use /sud floating
point instructions (dynamic rounding) instead of /su (nearest rounding).
The second one inlines the multiplication for normal numbers.
Interestingly the inline code uses /su by default, however as s_cpow.c
is compiled with -mfp-rounding-mode=d it ends up with the /sud version.
I don't really know how this should be fixed on the glibc side.
Thanks,
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net