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:
parent
749cbccc55
commit
4641693796
|
@ -331,7 +331,7 @@ static double zero = 0.0; /* used as const */
|
||||||
case 40:
|
case 40:
|
||||||
case 140:
|
case 140:
|
||||||
/* gamma(finite) overflow */
|
/* gamma(finite) overflow */
|
||||||
retval = HUGE_VAL;
|
retval = copysign(HUGE_VAL, x);
|
||||||
errno = ERANGE;
|
errno = ERANGE;
|
||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
|
|
Loading…
Reference in New Issue