From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id F3B423857C53; Mon, 10 Aug 2020 08:35:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3B423857C53 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libm/math: ensure that expf(-huge) sets FE_UNDERFLOW exception X-Act-Checkin: newlib-cygwin X-Git-Author: Keith Packard via Newlib X-Git-Refname: refs/heads/master X-Git-Oldrev: 225d376b70f92bbb68b57b928a29044ab3c30acf X-Git-Newrev: 73b02710ecbea5ace2508527fbc4f939c87069cd Message-Id: <20200810083536.F3B423857C53@sourceware.org> Date: Mon, 10 Aug 2020 08:35:36 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2020 08:35:37 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=73b02710ecbea5ace2508527fbc4f939c87069cd commit 73b02710ecbea5ace2508527fbc4f939c87069cd Author: Keith Packard via Newlib Date: Fri Aug 7 22:40:21 2020 -0700 libm/math: ensure that expf(-huge) sets FE_UNDERFLOW exception It was calling __math_uflow(0) instead of __math_uflowf(0), which resulted in no exception being set on machines with exception support for float but not double. Signed-off-by: Keith Packard Diff: --- newlib/libm/math/ef_exp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/math/ef_exp.c b/newlib/libm/math/ef_exp.c index 0cd0c00b3..d6e25bfcd 100644 --- a/newlib/libm/math/ef_exp.c +++ b/newlib/libm/math/ef_exp.c @@ -64,7 +64,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */ if(sx > FLT_UWORD_LOG_MAX) return __math_oflowf(0); /* overflow */ if(sx < 0 && hx > FLT_UWORD_LOG_MIN) - return __math_uflow(0); /* underflow */ + return __math_uflowf(0); /* underflow */ /* argument reduction */ if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */