glibc/sysdeps
Joseph Myers a91fd168a0 Fix x86_64/x86 powl handling of sNaN arguments (bug 20916).
The x86_64/x86 powl implementations mishandle sNaN arguments, both by
returning sNaN in some cases (instead of doing arithmetic on the
arguments to produce the result when NaN arguments result in NaN
results) and by treating sNaN the same as qNaN for arguments (1, sNaN)
and (sNaN, 0), contrary to TS 18661-1 which requires those cases to
return qNaN instead of 1.

This patch makes the x86_64/x86 powl implementations follow TS 18661-1
semantics for sNaN arguments; sNaN tests are also added for pow.
Given the problems with testing float and double sNaN arguments on
32-bit x86 (sNaN tests disabled because the compiler may convert
unnecessarily to a qNaN when passing arguments), no changes are made
to the powf and pow implementations there.

Tested for x86_64 and x86.

	[BZ #20916]
	* sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Do not return 1 for
	arguments (sNaN, 0) or (1, sNaN).  Do arithmetic on NaN arguments
	to compute result.
	* sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Likewise.
	* math/libm-test.inc (pow_test_data): Add tests of sNaN arguments.
2016-12-06 00:33:19 +00:00
..
aarch64 aarch64: Use explicit offsets in _dl_tlsdesc_dynamic 2016-12-02 16:52:57 +01:00
alpha Add missing hidden_def (__sigsetjmp). 2016-12-01 20:49:25 +00:00
arm Refactor FP_FAST_* into bits/fp-fast.h. 2016-11-29 01:45:00 +00:00
generic ld.so: Remove __libc_memalign 2016-11-30 16:23:58 +01:00
gnu Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00
hppa Add missing hidden_def (__sigsetjmp). 2016-12-01 20:49:25 +00:00
i386 Fix x86_64/x86 powl handling of sNaN arguments (bug 20916). 2016-12-06 00:33:19 +00:00
ia64 Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
ieee754 Fix sysdeps/ieee754 pow handling of sNaN arguments (bug 20916). 2016-12-02 23:21:15 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
m68k Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
mach Fix hurd __access_noerrno implementation. 2016-11-18 16:49:08 -02:00
microblaze Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
mips Add missing hidden_def (__sigsetjmp). 2016-12-01 20:49:25 +00:00
nacl Add llogb, llogbf, llogbl. 2016-12-02 01:42:49 +00:00
nios2 Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
nptl Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
posix hurd: fix fcntl visibility 2016-09-18 23:48:55 +02:00
powerpc powerpc: Remove stpcpy internal clash with IFUNC 2016-12-01 15:53:16 -02:00
pthread Installed-header hygiene (BZ#20366): time.h types. 2016-09-23 08:43:56 -04:00
s390 S390: Regenerate ULPs. 2016-12-02 12:52:36 +01:00
sh Add missing hidden_def (__sigsetjmp). 2016-12-01 20:49:25 +00:00
sparc Add missing hidden_def (__sigsetjmp). 2016-12-01 20:49:25 +00:00
tile Add missing hidden_def (__sigsetjmp). 2016-12-01 20:49:25 +00:00
unix Use C11-like atomics instead of plain memory accesses in x86 lock elision. 2016-12-05 16:19:43 +01:00
wordsize-32 Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00
wordsize-64 Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00
x86 Use C11-like atomics instead of plain memory accesses in x86 lock elision. 2016-12-05 16:19:43 +01:00
x86_64 Fix x86_64/x86 powl handling of sNaN arguments (bug 20916). 2016-12-06 00:33:19 +00:00