glibc/sysdeps/ieee754
Joseph Myers edbbdb1855 Fix powf inaccuracy (bug 21112).
Bug 21112 reports a case where powf is substantially inaccurate.  This
results from a multiplication where cp_h*p_h is required to be exact,
and p_h is masked to have only 12 leading nonzero bits in its
mantissa, but the value of cp_h has the 13th bit nonzero, leading to
inexact multiplication results in some cases that can result in large
errors in the final result of powf.  This patch fixes this by using a
value of cp_h correctly rounded to nearest to 12 bits, with a
corresponding updated value of cp_l.

Tested for x86_64 and x86.

	[BZ #21112]
	* sysdeps/ieee754/flt-32/e_powf.c (cp_h): Use value with trailing
	12 bits zero.
	(cp_l): Update for new value of cp_h.
	* math/auto-libm-test-in: Add another test of pow.
	* math/auto-libm-test-out-pow: Regenerated.
2017-02-07 17:15:47 +00:00
..
bits Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dbl-64 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
flt-32 Fix powf inaccuracy (bug 21112). 2017-02-07 17:15:47 +00:00
ldbl-64-128 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldbl-96 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldbl-128 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldbl-128ibm Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldbl-opt Move wrappers to libm-compat-calls-auto 2017-01-04 16:25:04 -02:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
k_standard.c Fix pow (qNaN, 0) result with -lieee (bug 20919), remove dead parts of wrappers. 2016-12-02 22:50:46 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
k_standardl.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
s_lib_version.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_matherr.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_signgam.c Fix lgamma setting signgam for ISO C (bug 15421). 2015-11-20 22:49:59 +00:00