public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Replace always true if with else
Date: Thu, 13 Apr 2023 17:37:11 +0000 (GMT)	[thread overview]
Message-ID: <20230413173711.5774F3858D39@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ef75abddc76a914aabbb976dd116e39ab196bd28

commit ef75abddc76a914aabbb976dd116e39ab196bd28
Author: Andoni Arregi <andoni.arregui@gtd-gmbh.de>
Date:   Wed Apr 12 17:34:45 2023 +0200

    Replace always true if with else

Diff:
---
 newlib/libm/math/e_pow.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/newlib/libm/math/e_pow.c b/newlib/libm/math/e_pow.c
index 0e2251f10..b21726007 100644
--- a/newlib/libm/math/e_pow.c
+++ b/newlib/libm/math/e_pow.c
@@ -198,8 +198,11 @@ ivln2_l  =  1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
     /* |y| is huge */
 	if(iy>0x42000000) { /* if |y| > ~2**33 (does not regard mantissa) */
 	    if(iy>0x43f00000){	/* if |y| > ~2**64, must o/uflow and y is an even integer */
-		if(ix<=0x3fefffff) return (hy<0)? __math_oflow(0):__math_uflow(0);
-		if(ix>=0x3ff00000) return (hy>0)? __math_oflow(0):__math_uflow(0);
+		if(ix<=0x3fefffff) { /* |x| < 1 */
+		    return (hy<0)? __math_oflow(0):__math_uflow(0);
+		} else {             /* |x| >= 1 */
+		    return (hy>0)? __math_oflow(0):__math_uflow(0);
+		}
 	    }
 	/* over/underflow if x is not close to one */
 	    if(ix<0x3fefffff) return (hy<0)? __math_oflow(sign<0):__math_uflow(sign<0);

                 reply	other threads:[~2023-04-13 17:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230413173711.5774F3858D39@sourceware.org \
    --to=jjohnstn@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).