changed over/underflow for exp()
authoreck <none@none>
Mon, 9 Apr 1990 16:54:09 +0000 (16:54 +0000)
committereck <none@none>
Mon, 9 Apr 1990 16:54:09 +0000 (16:54 +0000)
lang/cem/libcc.ansi/math/exp.c

index 11a3ab6..d416fea 100644 (file)
@@ -36,12 +36,12 @@ exp(double x)
        int     n;
        int     negative = x < 0;
 
-       if (x <= M_LN_MIN_D) {
-               if (x < M_LN_MIN_D) errno = ERANGE;
+       if (x < M_LN_MIN_D) {
+               errno = ERANGE;
                return 0.0;
        }
-       if (x >= M_LN_MAX_D) {
-               if (x > M_LN_MAX_D) errno = ERANGE;
+       if (x > M_LN_MAX_D) {
+               errno = ERANGE;
                return HUGE_VAL;
        }