unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
	'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Improve hypot performance
Date: Tue, 30 Nov 2021 15:19:19 -0300	[thread overview]
Message-ID: <35add3fb-42a6-4f3a-61f9-79ca49a33dc0@linaro.org> (raw)
In-Reply-To: <VE1PR08MB5599DFC6FA620B3B3AFA212B83679@VE1PR08MB5599.eurprd08.prod.outlook.com>



On 30/11/2021 10:04, Wilco Dijkstra via Libc-alpha wrote:
> +
> +static inline double
> +handle_errno (double r)
>  {
> -  double a, b, t1, t2, y1, y2, w;
> -  int32_t j, k, ha, hb;
> -
> -  GET_HIGH_WORD (ha, x);
> -  ha &= 0x7fffffff;
> -  GET_HIGH_WORD (hb, y);
> -  hb &= 0x7fffffff;
> -  if (hb > ha)
> -    {
> -      a = y; b = x; j = ha; ha = hb; hb = j;
> -    }
> +  r = math_narrow_eval (r);
> +  if (isinf (r))
> +    __set_errno (ERANGE);
> +  return r;
> +}
> +

Without removing the hypot wrapper, this errno handling is superfluous. 

  parent reply	other threads:[~2021-11-30 18:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 13:04 [PATCH] Improve hypot performance Wilco Dijkstra via Libc-alpha
2021-11-30 16:27 ` Adhemerval Zanella via Libc-alpha
2021-11-30 18:19 ` Adhemerval Zanella via Libc-alpha [this message]
2021-12-01 11:12 ` Paul Zimmermann
2021-12-01 12:06   ` Adhemerval Zanella via Libc-alpha
2021-12-01 13:20     ` Wilco Dijkstra via Libc-alpha
2021-12-01 13:26     ` Paul Zimmermann
2021-12-01 14:08       ` Wilco Dijkstra via Libc-alpha
2021-12-01 17:14     ` Wilco Dijkstra via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=35add3fb-42a6-4f3a-61f9-79ca49a33dc0@linaro.org \
    --to=libc-alpha@sourceware.org \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=adhemerval.zanella@linaro.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).