public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: 'GNU C Library' <libc-alpha@sourceware.org>
Subject: [PATCH v3 6/7] i386: Move hypot implementation to C
Date: Mon, 22 Nov 2021 14:47:23 +0000	[thread overview]
Message-ID: <VE1PR08MB5599BBEC6468CAFE39D94C51839F9@VE1PR08MB5599.eurprd08.prod.outlook.com> (raw)

Hi Adhemerval,

One more comment on this version:

+  long double lx = x;
+  long double ly = y;
+  double r = sqrtl (math_narrow_eval (lx * lx + ly * ly));
+  math_check_force_underflow_nonneg (r);
+  return r;

I think Joseph meant something like:

double r = math_narrow_eval ((double) sqrtl (lx * lx + ly * ly));

The narrow eval macro forces the result to memory to remove excess
precision but it only works if it has the narrower type already.

Cheers,
Wilco

             reply	other threads:[~2021-11-22 14:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 14:47 Wilco Dijkstra [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-01 20:20 [PATCH v3 0/7] Improve hypot() Adhemerval Zanella
2021-11-01 20:20 ` [PATCH v3 6/7] i386: Move hypot implementation to C 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=VE1PR08MB5599BBEC6468CAFE39D94C51839F9@VE1PR08MB5599.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=adhemerval.zanella@linaro.org \
    --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).