This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eb1920
)
tgamma infinity limit for IEEE quad prec.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Thu, 20 Nov 2014 02:40:55 +0000
(21:40 -0500)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Fri, 21 Nov 2014 01:27:56 +0000
(20:27 -0500)
ext/POSIX/POSIX.xs
patch
|
blob
|
blame
|
history
diff --git
a/ext/POSIX/POSIX.xs
b/ext/POSIX/POSIX.xs
index
1485d3d
..
9d41bf0
100644
(file)
--- a/
ext/POSIX/POSIX.xs
+++ b/
ext/POSIX/POSIX.xs
@@
-829,9
+829,15
@@
static NV my_tgamma(NV x)
}
/* Third interval: [12, +Inf) */
- if (x > 171.624) { /* XXX Too low for quad precision */
+#if LDBL_MANT_DIG == 113 /* IEEE quad prec */
+ if (x > 1755.548) {
return NV_INF;
}
+#else
+ if (x > 171.624) {
+ return NV_INF;
+ }
+#endif
return Perl_exp(c99_lgamma(x));
}