glibc/sysdeps/ieee754
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
..
bits Better distinguish between NaN/qNaN/sNaN. 2013-03-15 19:06:02 +01:00
dbl-64 Consolidate code to compute sin and cos from lookup tables 2013-12-20 16:01:03 +05:30
flt-32 PowerPC: multiarch finite/finitef for PowerPC32 2013-12-06 05:47:03 -06:00
ldbl-64-128 [BZ #15522] strtod ("nan(N)") returning a sNaN in some cases 2013-08-29 12:22:10 +02:00
ldbl-96 Fix hypot handling of subnormals (bug 16316, bug 16330). 2013-12-17 13:42:13 +00:00
ldbl-128 Fix ldbl-128 lgammal for small negative arguments (bug 16337). 2013-12-22 20:50:16 +00:00
ldbl-128ibm PowerPC: multiarch logb/logbf/logbl for PowerPC32 2013-12-06 05:47:05 -06:00
ldbl-opt rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
ieee754.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
k_standard.c Fix Bessel function error handling (bug 6807, bug 15901). 2013-12-04 14:39:37 +00:00
Makefile Update. 2000-02-26 01:21:37 +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 Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
support.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00