Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2020-09-15 20:10:07 +0300
committerJeff Johnston <jjohnstn@redhat.com>2020-09-19 00:20:27 +0300
commit4641693796509d595f8c0521f914faccff77b3ba (patch)
treeebefcee122b7148533f6840d92d83f35acc74caa /newlib/libm/math
parent749cbccc55146bdf65a50b71267a16f5bd180334 (diff)
libm: Make tgamma(-small) = -INFINITY
Need to copy the argument sign to the output for tgamma(finite) overflow case. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'newlib/libm/math')
-rw-r--r--newlib/libm/math/k_standard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libm/math/k_standard.c b/newlib/libm/math/k_standard.c
index 906412ba7..beab51e16 100644
--- a/newlib/libm/math/k_standard.c
+++ b/newlib/libm/math/k_standard.c
@@ -331,7 +331,7 @@ static double zero = 0.0; /* used as const */
case 40:
case 140:
/* gamma(finite) overflow */
- retval = HUGE_VAL;
+ retval = copysign(HUGE_VAL, x);
errno = ERANGE;
break;
case 41: