This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use -frounding-math for math testsuite
On 05/07/2012 06:21 PM, David Miller wrote:
From: Richard Guenther<rguenther@suse.de>
Date: Mon, 7 May 2012 10:55:30 +0200 (CEST)
On Sat, 5 May 2012, Joseph S. Myers wrote:
On Wed, 2 May 2012, Richard Guenther wrote:
There is also -fsignalling-nans which is off by default, too. Not sure
if that makes a difference though, but GCC for example folds x + 0.0 to
x with the default setting.
I don't see it doing that folding, but if it did it would be a bug, since
-fsigned-zeros is the default and -0.0 + 0.0 is +0.0 except in
round-downwards mode.
In fold_real_zero_addition_p - yes, it's also conditional on
-fno-signed-zeros.
Unfortunately, this change causes all kinds of math test failures on sparc.
For example, see math/test-double.out below.
I think we should revert this until we can sort it out, especially since
I anticipate that it will take quite some time to do so.
This is sad - especially as Joseph reported in a bugzilla that the
change helped to fix some bugs.
Reference:
http://sourceware.org/bugzilla/show_bug.cgi?id=10846
But those numbers are really bad - I'll revert later.
What should be done here?
Andreas
--------------------
testing double (without inline functions)
Failure: Test: gamma (0) == inf plus division by zero exception
Result:
is: 1.61395818209599432208e-314 0x0.00000c2b5b2f00000000p-1022
should be: inf inf
Failure: gamma (-3) == inf plus division by zero exception: Exception "Divide by zero" not set
Failure: Test: gamma (-3) == inf plus division by zero exception
Result:
is: 3.00000000000000000000e+00 0x1.80000000000000000000p+1
should be: inf inf
Failure: Test: gamma (-0.5) == log(2*sqrt(pi))
Result:
is: 5.00000135795793831939e-01 0x1.0000048e7a1bd0000000p-1
should be: 1.26551212348464536817e+00 0x1.43f89a3f0edd60000000p+0
difference: 7.65511987688851536227e-01 0x1.87f12fefa39ef0000000p-1
ulp : 3447559502503159.5000
max.ulp : 0.0000
Failure: Test: gamma (-0.5) sets signgam to -1
Result:
is: 1
should be: -1
Maximal error of `gamma'
is : 3447559502503160 ulp
accepted: 0 ulp
Failure: Test: lgamma (0) == inf plus division by zero exception
Result:
is: 0.00000000000000000000e+00 0x0.00000000000000000000p+0
should be: inf inf
Failure: Test: lgamma (-0) == inf plus division by zero exception
Result:
is: -0.00000000000000000000e+00 -0x0.00000000000000000000p+0
should be: inf inf
Failure: lgamma (-3) == inf plus division by zero exception: Exception "Divide by zero" not set
Failure: Test: lgamma (-3) == inf plus division by zero exception
Result:
is: 3.00000000000000000000e+00 0x1.80000000000000000000p+1
should be: inf inf
Failure: Test: errno for lgamma(-integer) == ERANGE
Result:
is: 0
should be: 34
Failure: lgamma (-max_value) == inf plus division by zero exception: Exception "Invalid operation" set
Failure: Test: lgamma (-max_value) == inf plus division by zero exception
Result:
is: nan nan
should be: inf inf
Failure: lgamma (max_value) == inf plus overflow exception: Exception "Invalid operation" set
Failure: Test: lgamma (max_value) == inf plus overflow exception
Result:
is: nan nan
should be: inf inf
Failure: Test: lgamma (-0.5) == log(2*sqrt(pi))
Result:
is: 5.00000135795793831939e-01 0x1.0000048e7a1bd0000000p-1
should be: 1.26551212348464536817e+00 0x1.43f89a3f0edd60000000p+0
difference: 7.65511987688851536227e-01 0x1.87f12fefa39ef0000000p-1
ulp : 3447559502503159.5000
max.ulp : 0.0000
Failure: Test: lgamma (-0.5) sets signgam to -1
Result:
is: 1
should be: -1
Maximal error of `lgamma'
is : 3447559502503160 ulp
accepted: 1 ulp
Failure: tgamma (max_value) == inf plus overflow exception: Exception "Invalid operation" set
Failure: Test: tgamma (max_value) == inf plus overflow exception
Result:
is: nan nan
should be: inf inf
Failure: Test: tgamma (-2) == NaN plus invalid exception
Result:
is: -2.00000000000000000000e+00 -0x1.00000000000000000000p+1
should be: nan nan
Failure: Test: tgamma (-0.5) == -2 sqrt (pi)
Result:
is: 1.64872127070012819416e+00 0x1.a61298e1e069c0000000p+0
should be: -3.54490770181103220793e+00 -0x1.c5bf891b4ef6b0000000p+1
difference: 5.19362897251115995800e+00 0x1.4c646ac61f95c0000000p+2
ulp : 11695012752650936.0000
max.ulp : 1.0000
Maximal error of `tgamma'
is : 11695012752650936 ulp
accepted: 1 ulp
Test suite completed:
4048 test cases plus 3587 tests for exception flags executed.
23 errors occurred.
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126