Message ID | 20170624111003.GA284@x4 |
---|---|
State | New |
Headers | show |
On Sat, 24 Jun 2017, Markus Trippelsdorf wrote: > On 2017.06.23 at 20:23 +0000, Joseph Myers wrote: > > Testing with GCC 7 for 32-bit x86 showed some ulps differences, > > presumably from variation in when values with excess precision get > > spilled to the stack and so lose that precision. This patch updates > > the libm-test-ulps files accordingly. > > For AMD Ryzen x86_64 I need an additional update: Such updates should generally just be committed. In this case (x86_64, not long double) I'm not clear why you'd have ulps variation between processors, since excess precision is irrelevant on x86_64 and the x87 transcendental instructions would only be used for long double. But it could be an fma issue, if $CC $CFLAGS defaults to generating fma instructions, as that can cause ulps variation across architectures.
On 2017.06.26 at 10:43 +0000, Joseph Myers wrote: > On Sat, 24 Jun 2017, Markus Trippelsdorf wrote: > > > On 2017.06.23 at 20:23 +0000, Joseph Myers wrote: > > > Testing with GCC 7 for 32-bit x86 showed some ulps differences, > > > presumably from variation in when values with excess precision get > > > spilled to the stack and so lose that precision. This patch updates > > > the libm-test-ulps files accordingly. > > > > For AMD Ryzen x86_64 I need an additional update: > > Such updates should generally just be committed. In this case (x86_64, > not long double) I'm not clear why you'd have ulps variation between > processors, since excess precision is irrelevant on x86_64 and the x87 > transcendental instructions would only be used for long double. But it > could be an fma issue, if $CC $CFLAGS defaults to generating fma > instructions, as that can cause ulps variation across architectures. Yes, it should be an fma issue because I used "march=native" (which turns on -mfma). I don't have write access, so it would be nice if somebody could commit the patch for me. Thanks.
On Mon, 26 Jun 2017, Markus Trippelsdorf wrote: > On 2017.06.26 at 10:43 +0000, Joseph Myers wrote: > > On Sat, 24 Jun 2017, Markus Trippelsdorf wrote: > > > > > On 2017.06.23 at 20:23 +0000, Joseph Myers wrote: > > > > Testing with GCC 7 for 32-bit x86 showed some ulps differences, > > > > presumably from variation in when values with excess precision get > > > > spilled to the stack and so lose that precision. This patch updates > > > > the libm-test-ulps files accordingly. > > > > > > For AMD Ryzen x86_64 I need an additional update: > > > > Such updates should generally just be committed. In this case (x86_64, > > not long double) I'm not clear why you'd have ulps variation between > > processors, since excess precision is irrelevant on x86_64 and the x87 > > transcendental instructions would only be used for long double. But it > > could be an fma issue, if $CC $CFLAGS defaults to generating fma > > instructions, as that can cause ulps variation across architectures. > > Yes, it should be an fma issue because I used "march=native" (which > turns on -mfma). > I don't have write access, so it would be nice if somebody could commit > the patch for me. Now committed.
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index 61da961a57..2f74643d34 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -1381,9 +1381,9 @@ ldouble: 3 Function: Imaginary part of "ctan_upward": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 ildouble: 3 ldouble: 3