OSDN Git Service
(root)
/
android-x86
/
external-musl-libc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f29fea0
)
math: fix tgamma to raise underflow for large negative values
author
Szabolcs Nagy
<nsz@port70.net>
Thu, 15 Aug 2013 10:13:02 +0000
(10:13 +0000)
committer
Szabolcs Nagy
<nsz@port70.net>
Thu, 15 Aug 2013 10:13:02 +0000
(10:13 +0000)
src/math/tgamma.c
patch
|
blob
|
history
diff --git
a/src/math/tgamma.c
b/src/math/tgamma.c
index
691e86a
..
f91af73
100644
(file)
--- a/
src/math/tgamma.c
+++ b/
src/math/tgamma.c
@@
-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;