From: Paul Zimmermann <Paul.Zimmermann@inria.fr>
To: Joseph Myers <joseph@codesourcery.com>
Cc: adhemerval.zanella@linaro.org, libc-alpha@sourceware.org
Subject: Re: [PATCH 8/9] i386: Move hypot implementation to C
Date: Thu, 07 Oct 2021 10:28:43 +0200 [thread overview]
Message-ID: <mwily9z1ac.fsf@tomate.loria.fr> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2110061950550.3641536@digraph.polyomino.org.uk> (message from Joseph Myers on Wed, 6 Oct 2021 19:52:12 +0000)
> > In fact we need to handle underflow:
> >
> > long double lx = x;
> > long double ly = y;
> > double r = sqrtl (lx * lx + ly * ly);
>
> You probably also need a math_narrow_eval here to ensure the value checked
> for overflow and returned has definitely been properly narrowed to double
> first.
right, If x = y = 0x1.fffffffffffffp1023, then lx * lx + ly * ly will not
overflow as long double, nor sqrtl(.), but the conversion to double will.
This should probably be added as a test case (if not already).
Paul
next prev parent reply other threads:[~2021-10-07 8:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-06 18:05 [PATCH 0/9] Improve hypot() Adhemerval Zanella
2021-10-06 18:05 ` [PATCH 1/9] benchtests: Make hypot input random Adhemerval Zanella
2021-10-07 9:48 ` Paul Zimmermann
2021-10-07 11:20 ` Adhemerval Zanella
2021-10-07 17:08 ` Joseph Myers
2021-10-06 18:05 ` [PATCH 2/9] benchtests: Add hypotf Adhemerval Zanella
2021-10-07 10:40 ` Paul Zimmermann
2021-10-06 18:05 ` [PATCH 3/9] math: Simplify hypotf implementation Adhemerval Zanella
2021-10-07 9:44 ` Paul Zimmermann
2021-10-07 11:37 ` Adhemerval Zanella
2021-10-07 12:08 ` Paul Zimmermann
2021-10-06 18:05 ` [PATCH 4/9] math: Use an improved algorithm for hypot (dbl-64) Adhemerval Zanella
2021-10-06 18:05 ` [PATCH 5/9] math: Use an improved algorithm for hypotl (ldbl-96) Adhemerval Zanella
2021-10-06 18:05 ` [PATCH 6/9] math: Use an improved algorithm for hypotl (ldbl-128) Adhemerval Zanella
2021-10-06 18:05 ` [PATCH 7/9] math: Remove powerpc e_hypot Adhemerval Zanella
2021-10-06 19:43 ` Paul E Murphy
2021-10-06 19:46 ` Adhemerval Zanella
2021-10-06 19:51 ` Paul E Murphy
2021-10-12 12:17 ` Paul A. Clarke
2021-10-06 18:05 ` [PATCH 8/9] i386: Move hypot implementation to C Adhemerval Zanella
2021-10-06 18:37 ` Joseph Myers
2021-10-06 19:19 ` Adhemerval Zanella
2021-10-06 19:20 ` Adhemerval Zanella
2021-10-06 19:52 ` Joseph Myers
2021-10-07 8:28 ` Paul Zimmermann [this message]
2021-10-07 17:05 ` Joseph Myers
2021-10-06 18:05 ` [PATCH 9/9] math: Remove the error handling wrapper from hypot and hypotf Adhemerval Zanella
2021-10-06 18:38 ` Joseph Myers
2021-10-06 19:23 ` Adhemerval Zanella
2021-10-07 11:03 ` [PATCH 0/9] Improve hypot() Paul Zimmermann
2021-10-07 12:39 ` Adhemerval Zanella
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=mwily9z1ac.fsf@tomate.loria.fr \
--to=paul.zimmermann@inria.fr \
--cc=adhemerval.zanella@linaro.org \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@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).