glibc/sysdeps/ieee754/ldbl-96
Joseph Myers 5a9e4c09a2 Fix ldbl-96 scalblnl underflowing results (bug 17803).
The ldbl-96 implementation of scalblnl (used for x86_64 and ia64) uses
a condition k <= -63 to determine when a standard underflowing result
tiny*__copysignl(tiny,x) should be returned.  However, that condition
corresponds to values with exponent -16446 or less, and in the case of
-16446, the correct result for round-to-nearest depends on whether the
value is exactly 0x1p-16446 (half the least subnormal) or more than
that.  This patch fixes the bug by changing the condition to k <= -64
and accordingly adjusting the exponent by 64 not 63 when converting to
a normal value.

Tested for x86_64.

	[BZ #17803]
	* sysdeps/ieee754/ldbl-96/s_scalblnl.c (twom63): Rename to
	twom64.  Adjust value to 0x1p-64L.
	(__scalblnl): Only return standard underflowing result for K <=
	-64 not K <= -63; adjust exponent for underflowing result by 64
	not 63.
	* math/libm-test.inc (scalbn_test_data): Add more tests.
	(scalbln_test_data): Likewise.
2015-01-12 23:02:14 +00:00
..
e_acoshl.c Fix acosh (1) in round-downward mode (bug 16927). 2014-05-14 12:35:40 +00:00
e_asinl.c
e_atanhl.c
e_coshl.c Fix cosh spurious underflows from expm1 (bug 16354), inaccurate results near 0 (bug 17061). 2014-06-23 20:20:10 +00:00
e_gammal_r.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e_hypotl.c Fix hypot handling of subnormals (bug 16316, bug 16330). 2013-12-17 13:42:13 +00:00
e_j0l.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
e_j1l.c Set errno for y1 overflow (bug 17050). 2014-06-23 20:17:13 +00:00
e_jnl.c Fix yn overflow handling in non-default rounding modes (bug 16561, bug 16562). 2014-06-27 14:52:13 +00:00
e_lgammal_r.c
e_rem_pio2l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e_sinhl.c
gamma_product.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gamma_productl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
k_cosl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
k_sinl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
k_tanl.c
ldbl2mpn.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
math_ldbl.h
mpn2ldbl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
printf_fphex.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_asinhl.c
s_cbrtl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_copysignl.c
s_cosl.c
s_erfl.c Fix erf underflow handling near 0 (bug 16516). 2014-05-14 12:34:03 +00:00
s_fma.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_fmal.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_frexpl.c
s_isinf_nsl.c
s_issignalingl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_llrintl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_llroundl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_lrintl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_lroundl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_modfl.c
s_nexttoward.c
s_nexttowardf.c
s_remquol.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_roundl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_scalblnl.c Fix ldbl-96 scalblnl underflowing results (bug 17803). 2015-01-12 23:02:14 +00:00
s_signbitl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_sincosl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_sinl.c
s_tanhl.c
s_tanl.c
strtold_l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
t_sincosl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
w_expl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x2y2m1.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x2y2m1l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00