projects
/
p5sagit/p5-mst-13.2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Avoid SIGFPE in Tru64.
[p5sagit/p5-mst-13.2.git]
/
numeric.c
diff --git
a/numeric.c
b/numeric.c
index
e7a5e8d
..
8d94975
100644
(file)
--- a/
numeric.c
+++ b/
numeric.c
@@
-580,6
+580,11
@@
S_mulexp10(NV value, I32 exponent)
return NV_MAX;
# endif
#endif
+#if defined(__alpha) && defined(__unix__)
+ if (!negative &&
+ (log10(value) + exponent) >= (DBL_MAX_10_EXP))
+ return NV_INF;
+#endif
for (bit = 1; exponent; bit <<= 1) {
if (exponent & bit) {
exponent ^= bit;