public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] [ranger] x == -0.0 does not mean we can replace x with -0.0
Date: Mon, 29 Aug 2022 11:07:39 -0600	[thread overview]
Message-ID: <21a88c69-eed3-7b1d-bbb7-15d37e5959fd@gmail.com> (raw)
In-Reply-To: <825cd304-4844-8708-cfe1-78b142af4f55@moene.org>



On 8/29/2022 9:13 AM, Toon Moene wrote:
> On 8/29/22 17:08, Jeff Law via Gcc-patches wrote:
>
>>> However, I'm hoping to forget as many floating point details, as fast
>>> as possible, as soon as I can ;-).
>
>> Actually FP isn't that bad -- I'd largely avoided it for decades, but 
>> didn't have a choice earlier this year.  And there's a lot more 
>> headroom for improvements in the FP space than the integer space IMHO.
>
> One of the more interesting ones is to try to limit the range of the 
> input to the trigonometric functions - that way you could use ones 
> without any argument reduction phase ...
The difficult part is that most of the trig stuff is in libraries, so we 
don't have visibility into the full range.

What we do sometimes have is knowledge that the special values are 
already handled which allows us to do things like automatically 
transform a division into estimation + NR correction steps (atan2).

I guess we could do specialization based on the input range.  So rather 
than calling "sin" we could call a special one that didn't have the 
reduction step when we know the input value is in a sensible range.

Jeff


  reply	other threads:[~2022-08-29 17:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 15:46 Aldy Hernandez
2022-08-26 16:40 ` Jakub Jelinek
2022-08-29 13:13   ` Aldy Hernandez
2022-08-29 13:21     ` Jakub Jelinek
2022-08-29 13:31       ` Aldy Hernandez
2022-08-29 14:20         ` Jeff Law
2022-08-29 14:26           ` Aldy Hernandez
2022-08-29 15:08             ` Jeff Law
2022-08-29 15:13               ` Toon Moene
2022-08-29 17:07                 ` Jeff Law [this message]
2022-08-29 17:37                   ` Koning, Paul
2022-08-29 19:04                   ` Toon Moene
2022-08-29 15:29               ` Aldy Hernandez
2022-08-31 10:08       ` Aldy Hernandez

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=21a88c69-eed3-7b1d-bbb7-15d37e5959fd@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.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).