public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>
Cc: Keith Packard <keithp@keithp.com>, newlib@sourceware.org
Subject: Re: [PATCH] libm/math: Use __math_xflow in obsolete math code
Date: Mon, 3 Aug 2020 13:32:48 +0200	[thread overview]
Message-ID: <20200803113248.GN460314@calimero.vinschen.de> (raw)
In-Reply-To: <20200803092108.GA14398@arm.com>

On Aug  3 10:21, Szabolcs Nagy wrote:
> The 08/01/2020 15:40, Keith Packard wrote:
> > You're right -- here's an updated patch which uses (s < 0) as that
> > doesn't require an extra constant.
> > 
> 
> v2 looks good.
> 
> 
> > From 259c26b2a6697a813d5cd41923079eb873321b3b Mon Sep 17 00:00:00 2001
> > From: Keith Packard <keithp@keithp.com>
> > Date: Thu, 30 Jul 2020 16:41:05 -0700
> > Subject: [PATCH] libm/math: Use __math_xflow in obsolete math code [v2]
> > 
> > C compilers may fold const values at compile time, so expressions
> > which try to elicit underflow/overflow by performing simple
> > arithemetic on suitable values will not generate the required
> > exceptions.
> > 
> > Work around this by replacing code which does these arithmetic
> > operations with calls to the existing __math_xflow functions that are
> > designed to do this correctly.
> > 
> > Signed-off-by: Keith Packard <keithp@keithp.com>
> > 
> > ----
> > 
> > v2:
> > 	libm/math: Pass sign to __math_xflow instead of muliplying result
> > ---
> >  newlib/libm/common/math_errf.c |  2 +-
> >  newlib/libm/math/e_cosh.c      |  9 +++++----
> >  newlib/libm/math/e_exp.c       |  5 +++--
> >  newlib/libm/math/e_pow.c       | 18 ++++++++----------
> >  newlib/libm/math/ef_cosh.c     |  7 ++++---
> >  newlib/libm/math/ef_exp.c      |  5 +++--
> >  newlib/libm/math/ef_pow.c      | 14 ++++++--------
> >  newlib/libm/math/s_erf.c       |  3 ++-
> >  newlib/libm/math/sf_erf.c      |  3 ++-
> >  9 files changed, 34 insertions(+), 32 deletions(-)

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat


  reply	other threads:[~2020-08-03 11:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 23:42 Keith Packard
2020-07-31 15:19 ` Szabolcs Nagy
2020-08-01 22:40   ` Keith Packard
2020-08-03  9:21     ` Szabolcs Nagy
2020-08-03 11:32       ` Corinna Vinschen [this message]
2020-08-03 17:56       ` Keith Packard
2020-08-03 18:07   ` Keith Packard
2020-08-03 21:35     ` Szabolcs Nagy
2020-08-03 23:21       ` Keith Packard

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=20200803113248.GN460314@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=keithp@keithp.com \
    --cc=newlib@sourceware.org \
    --cc=szabolcs.nagy@arm.com \
    /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).