summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numeric.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/numeric.c b/numeric.c
index 1cb24d2273..f95fde33d3 100644
--- a/numeric.c
+++ b/numeric.c
@@ -744,9 +744,8 @@ S_mulexp10(NV value, I32 exponent)
* [1] Trying to establish a condition handler to trap floating point
* exceptions is not a good idea. */
#if defined(VMS) && !defined(__IEEE_FP) && defined(NV_MAX_10_EXP)
- if (!negative &&
- (log10(value) + exponent) >= (NV_MAX_10_EXP))
- return NV_MAX;
+ if ((log10(value) + exponent) >= (NV_MAX_10_EXP))
+ return negative ? 0.0 : NV_MAX;
#endif
/* In UNICOS and in certain Cray models (such as T90) there is no