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
..
Makefile * sysdeps/ieee754/ldbl-128/Makefile: New file. 2007-03-14 17:36:18 +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. 2013-01-02 19:05:09 +00:00
e_expl.c Fix typos. 2013-08-30 18:08:59 +02: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 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 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 Fix Bessel function spurious overflows for ldbl-128 / ldbl-128ibm (bug 15285). 2013-03-21 13:57:21 +00: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 lgammal for small negative arguments (bug 16337). 2013-12-22 20:50:16 +00:00
e_log2l.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_log10l.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_logl.c Fix ldbl-128 logl for subnormals (bug 16338). 2013-12-18 11:38:27 +00:00
e_powl.c Fix BZ #14811 for ldbl-128 too. 2012-11-16 21:39:54 -08:00
e_rem_pio2l.c Remove trailing whitespace. 2013-06-05 20:44:03 +00: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 Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426). 2013-05-08 11:58:18 +00:00
ieee754.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
k_cosl.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
k_sincosl.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
k_sinl.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
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
math_ldbl.h
mpn2ldbl.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
printf_fphex.c PowerPC floating point little-endian [1 of 15] 2013-10-04 10:31:41 +09:30
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 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 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. 2013-01-02 19:05:09 +00:00
s_fmal.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
s_fpclassifyl.c Fix leading whitespaces. 2013-06-06 20:36:07 +02: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 New <math.h> macro named issignaling to check for a signaling NaN (sNaN). 2013-04-02 13:51:02 +02:00
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 Optimize handling of denormals in logb/logbf/logbl 2012-05-26 13:53:22 +02:00
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 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 Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08: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 Remove trailing whitespace. 2013-06-05 20:44:03 +00: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. 2013-01-02 19:05:09 +00: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. 2013-01-02 19:05:09 +00:00
s_sincosl.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00: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 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 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
t_sincosl.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
w_expl.c Avoid overflows from long double functions using __kernel_standard. 2012-03-28 09:32:12 +00:00
x2y2m1l.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00