glibc/sysdeps/ieee754/ldbl-128
Joseph Myers f8ba1b5654 Fix log2 (1) in round-downward mode (bug 17042).
As with other issues of this kind, bug 17042 is log2 (1) wrongly
returning -0 instead of +0 in round-downward mode because of
implementations effectively in terms of log1p (x - 1).  This patch
fixes the issue in the same way used for log and log10.

Tested x86_64 and x86 and ulps updated accordingly.  Also tested for
mips64 to confirm a fix was needed for ldbl-128 and to validate that
fix (also applied to ldbl-128ibm since that version of log2l is
essentially the same as the ldbl-128 one).

	[BZ #17042]
	* sysdeps/i386/fpu/e_log2.S (__ieee754_log2): Take absolete value
	when x - 1 is zero.
	* sysdeps/i386/fpu/e_log2f.S (__ieee754_log2f): Likewise.
	* sysdeps/i386/fpu/e_log2l.S (__ieee754_log2l): Likewise.
	* sysdeps/ieee754/ldbl-128/e_log2l.c (__ieee754_log2l): Return
	0.0L for an argument of 1.0L.
	* sysdeps/ieee754/ldbl-128ibm/e_log2l.c (__ieee754_log2l):
	Likewise.
	* sysdeps/x86_64/fpu/e_log2l.S (__ieee754_log2l): Take absolute
	value when x - 1 is zero.
	* math/libm-test.inc (log2_test): Use ALL_RM_TEST.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-06-10 12:07:15 +00:00
..
e_acoshl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_acosl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_asinl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_atan2l.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_atanhl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_coshl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_exp10l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_expl.c BZ #16447: Fix ldbl-128 expl implementation. 2014-02-11 13:47:47 +01:00
e_fmodl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_gammal_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_hypotl.c Fix hypot handling of subnormals (bug 16316, bug 16330). 2013-12-17 13:42:13 +00:00
e_ilogbl.c Finish ilogb changes 2012-04-18 14:31:43 +02:00
e_j0l.c Fix Bessel function spurious overflows for ldbl-128 / ldbl-128ibm (bug 15285). 2013-03-21 13:57:21 +00:00
e_j1l.c [BZ #16824] Fix failing y1 due to too large ulps in downward/upward rounding mode. 2014-04-16 13:03:46 +02:00
e_jnl.c Fix Bessel function error handling (bug 6807, bug 15901). 2013-12-04 14:39:37 +00:00
e_lgammal_r.c Fix ldbl-128 / ldbl-128ibm lgammal spurious underflow (bug 16400). 2014-01-06 18:20:20 +00:00
e_log2l.c Fix log2 (1) in round-downward mode (bug 17042). 2014-06-10 12:07:15 +00:00
e_log10l.c Fix log10 (1) in round-downward mode (bug 16977). 2014-05-23 12:07:50 +00:00
e_logl.c Fix log (1) in round-downward mode (bug 16731). 2014-03-21 18:13:58 +00:00
e_powl.c Fix BZ #14811 for ldbl-128 too. 2012-11-16 21:39:54 -08:00
e_rem_pio2l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_remainderl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_sinhl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
gamma_productl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ieee754.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_cosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_sincosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_sinl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_tanl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
ldbl2mpn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile * sysdeps/ieee754/ldbl-128/Makefile: New file. 2007-03-14 17:36:18 +00:00
math_ldbl.h Update. 1999-07-15 18:26:25 +00:00
mpn2ldbl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
printf_fphex.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_asinhl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_atanl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_cbrtl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_ceill.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_copysignl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_cosl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_erfl.c Fix erf underflow handling near 0 (bug 16516). 2014-05-14 12:34:03 +00:00
s_expm1l.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_fabsl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_finitel.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_floorl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_fma.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmal.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s_fpclassifyl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_frexpl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_isinf_nsl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_isinfl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_isnanl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_issignalingl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_llrintl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_llroundl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_log1pl.c Fix log1pl (LDBL_MAX) in FE_UPWARD mode (bug 16564). 2014-05-14 12:38:56 +00:00
s_logbl.c Optimize handling of denormals in logb/logbf/logbl 2012-05-26 13:53:22 +02:00
s_lrintl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_lroundl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_modfl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_nearbyintl.c Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490). 2013-05-19 18:40:25 +00:00
s_nextafterl.c Fix nextafter overflow in non-default rounding modes (bug 16677). 2014-03-11 22:24:00 +00:00
s_nexttoward.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
s_nexttowardf.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_remquol.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_rintl.c Fix set-but-not-used warnings in ldbl-128 nearbyintl, rintl. 2012-11-20 14:26:07 +00:00
s_roundl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_scalblnl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_scalbnl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_signbitl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_sincosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_sinl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_tanhl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_tanl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_truncl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtold_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
t_expl.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
t_sincosl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
w_expl.c [BZ #16427] Fix ldbl-128 exp overflows. 2014-01-15 09:50:31 +01:00
x2y2m1l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00