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>
This commit is contained in:
Keith Packard 2020-09-15 10:10:07 -07:00 committed by Jeff Johnston
parent 749cbccc55
commit 4641693796
1 changed files with 1 additions and 1 deletions

View File

@ -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: