From: Rich Felker <dalias@aerifal.cx>
To: Andrew Haley <aph@redhat.com>
Cc: "Ondřej Bílka" <neleai@seznam.cz>,
"Joseph S. Myers" <joseph@codesourcery.com>,
"Siddhesh Poyarekar" <siddhesh@redhat.com>,
libc-alpha@sourceware.org, libc-ports@sourceware.org
Subject: Re: [PATCH][BZ #14412] Define __sincos_finite as a fast version of sincos
Date: Mon, 29 Apr 2013 15:19:00 -0000 [thread overview]
Message-ID: <20130429151848.GY20323@brightrain.aerifal.cx> (raw)
In-Reply-To: <517E894C.8090602@redhat.com>
On Mon, Apr 29, 2013 at 03:53:00PM +0100, Andrew Haley wrote:
> On 04/29/2013 03:15 PM, OndÅej BÃlka wrote:
> > On Mon, Apr 29, 2013 at 01:34:42PM +0000, Joseph S. Myers wrote:
> >> On Mon, 29 Apr 2013, Siddhesh Poyarekar wrote:
> >>
> >>> This patch brings back the assembly implementation of sincos (with
> >>> some changes) to give a fast alternative to the default sincos
> >>> implementation. This is defined as __sincos_finite and is used if the
> >>> implementing program is compiled with the -ffinite-math-only gcc flag.
> >>
> >> The changes don't seem to include accurate range reduction. Without that,
> >> I think this is inappropriate, as it will result in wildly inaccurate
> >> results for large but finite inputs.
> >>
> > These inputs contain zero significant digits. You cannot expect any
> > accuracty from them.
>
> You can't possibly know that. If the caller asks for sin(2^80) you should
> return a close approximation to sin(2^80), not garbage.
OndÅej is simply repeating the standard fallacy from people who think
floating point numbers represent intervals or some sort of
approximation with a distribution of possible "actual values" centered
on the nominal value. These views are all incorrect. Floating point
values are always exact values. Floating point _calculations_,
including conversion from decimal strings, can be inexact, but the
values represented, and used as inputs to floating point functions and
operators, are exact.
Rich
next prev parent reply other threads:[~2013-04-29 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 10:26 Siddhesh Poyarekar
2013-04-29 13:31 ` Andreas Schwab
2013-04-29 13:34 ` Joseph S. Myers
2013-04-29 14:02 ` Siddhesh Poyarekar
2013-04-29 14:16 ` Ondřej Bílka
2013-04-29 14:53 ` Andrew Haley
2013-04-29 15:19 ` Rich Felker [this message]
2013-04-30 8:59 ` Ondřej Bílka
2013-04-30 9:03 ` Siddhesh Poyarekar
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=20130429151848.GY20323@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=aph@redhat.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-ports@sourceware.org \
--cc=neleai@seznam.cz \
--cc=siddhesh@redhat.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).