glibc/sysdeps/ieee754/ldbl-128
Joseph Myers 4f40e4b307 Fix ldbl-128 lgammal for small negative arguments (bug 16337).
This patch fixes bug 16337, ldbl-128 lgammal spurious overflows for
small negative arguments (the arguments in question are already in the
testsuite).  The implementation uses the reflection formula to compute
lgamma of negative x from lgamma of -x, effectively resulting in a
calculation -log(x^2) + log(-x); cancellation isn't problematic in
this case (bugs for problematic cancellation in lgamma are 2542, 2543,
2558), but the x^2 calculation can underflow (in which case there is
spurious logic to return an overflowing value - lgamma can only ever
correctly overflow for large positive arguments, though tgamma can
overflow for small arguments of either sign as well as large positive
arguments).  The fix is simply to calculate the result directly with
logl when the argument is a small enough negative number.

Tested mips64.

	* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
	Calculate results for small negative arguments directly rather
	than using reflection formula with special underflow handling.
2013-12-22 20:50:16 +00:00
..
e_acoshl.c
e_acosl.c
e_asinl.c
e_atan2l.c
e_atanhl.c
e_coshl.c
e_exp10l.c
e_expl.c Fix typos. 2013-08-30 18:08:59 +02:00
e_fmodl.c
e_gammal_r.c Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426). 2013-05-08 11:58:18 +00:00
e_hypotl.c Fix hypot handling of subnormals (bug 16316, bug 16330). 2013-12-17 13:42:13 +00:00
e_ilogbl.c
e_j0l.c
e_j1l.c
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 lgammal for small negative arguments (bug 16337). 2013-12-22 20:50:16 +00:00
e_log2l.c
e_log10l.c
e_logl.c Fix ldbl-128 logl for subnormals (bug 16338). 2013-12-18 11:38:27 +00:00
e_powl.c
e_rem_pio2l.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
e_remainderl.c
e_sinhl.c
gamma_productl.c Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426). 2013-05-08 11:58:18 +00:00
ieee754.h
k_cosl.c
k_sincosl.c
k_sinl.c
k_tanl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
ldbl2mpn.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
Makefile
math_ldbl.h
mpn2ldbl.c
printf_fphex.c PowerPC floating point little-endian [1 of 15] 2013-10-04 10:31:41 +09:30
s_asinhl.c
s_atanl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_cbrtl.c
s_ceill.c
s_copysignl.c
s_cosl.c
s_erfl.c Fix erfc errno setting on underflow (bug 6786). 2013-12-03 16:25:18 +00:00
s_expm1l.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_fabsl.c
s_finitel.c
s_floorl.c
s_fma.c
s_fmal.c
s_fpclassifyl.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
s_frexpl.c
s_isinf_nsl.c
s_isinfl.c
s_isnanl.c
s_issignalingl.c
s_llrintl.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
s_llroundl.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
s_log1pl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_logbl.c
s_lrintl.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
s_lroundl.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
s_modfl.c
s_nearbyintl.c Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490). 2013-05-19 18:40:25 +00:00
s_nextafterl.c
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 Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_rintl.c
s_roundl.c
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
s_sincosl.c
s_sinl.c
s_tanhl.c
s_tanl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_truncl.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
strtold_l.c [BZ #15522] strtod ("nan(N)") returning a sNaN in some cases 2013-08-29 12:22:10 +02:00
t_expl.h
t_sincosl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
w_expl.c
x2y2m1l.c