math: fix tgamma to raise underflow for large negative values
This commit is contained in:
parent
f29fea00b5
commit
cd18dc8525
1 changed files with 1 additions and 0 deletions
|
|
@ -137,6 +137,7 @@ double tgamma(double x)
|
|||
/* x =< -184: tgamma(x)=+-0 with underflow */
|
||||
if (absx >= 184) {
|
||||
if (x < 0) {
|
||||
FORCE_EVAL((float)(0x1p-126/x));
|
||||
if (floor(x) * 0.5 == floor(x * 0.5))
|
||||
return 0;
|
||||
return -0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue