From 8c9149b0587f8c04334b01cd8edb9e17eec1e074 Mon Sep 17 00:00:00 2001 From: eck Date: Mon, 9 Apr 1990 16:54:09 +0000 Subject: [PATCH] changed over/underflow for exp() --- lang/cem/libcc.ansi/math/exp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/cem/libcc.ansi/math/exp.c b/lang/cem/libcc.ansi/math/exp.c index 11a3ab693..d416fea75 100644 --- a/lang/cem/libcc.ansi/math/exp.c +++ b/lang/cem/libcc.ansi/math/exp.c @@ -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; } -- 2.34.1