This is the mail archive of the
`gcc@gcc.gnu.org`
mailing list for the GCC project.

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |

Other format: | [Raw text] |

*From*: Robert Dewar <dewar at adacore dot com>*To*: gcc at gcc dot gnu dot org*Date*: Fri, 03 Feb 2012 10:33:58 -0500*Subject*: Re: weird optimization in sin+cos, x86 backend*References*: <CADn89gRRwQ5uPGCDMGZo28ofnAQsvU5PURKxPuvOPF1+ZbvO8g@mail.gmail.com> <CAFiYyc1oLgmP-bs2eyvW134SEzLONUxpcgiXMS4XnmamrUZ-9Q@mail.gmail.com> <Pine.LNX.4.64.1202031535030.25409@wotan.suse.de> <4F2BF9B6.20903@adacore.com> <20120203152858.GC5312@xvii.vinc17.org>

On 2012-02-03 10:13:58 -0500, Robert Dewar wrote:On 2/3/2012 10:01 AM, Michael Matz wrote:No normal math library supports such an extreme range, even basic identities (like cos^2+sin^2=1) aren't retained with such inputs.

I agree: the program is complete nonsense.

I disagree: there may be cases where large inputs can be meaningful. And it may be important that some identities (like cos^2+sin^2=1) be preserved.

It would be useful to know what the intent was.

If the user requested such a computation, there should at least be some intent. Unless an option like -ffast-math is given, the result should be accurate.

What is the basis for that claim? to me it seems useless to expect anything from such absurd arguments. Can you site a requirement to the contrary (other than your (to me) unrealistic expectations). In particular, such large numbers are of course represented imprecisely. Given that, i do not see a possible useful intent, obviously a 1 bit rounding error makes a gigantic difference to the final result here.

For the glibc, I've finally reported a bug here:

http://sourceware.org/bugzilla/show_bug.cgi?id=13658

Note that there have been other (somewhat different) complaints in the past, e.g.

http://sourceware.org/bugzilla/show_bug.cgi?id=13381

**Follow-Ups**:**Re: weird optimization in sin+cos, x86 backend***From:*Vincent Lefevre

**References**:**weird optimization in sin+cos, x86 backend***From:*Konstantin Vladimirov

**Re: weird optimization in sin+cos, x86 backend***From:*Richard Guenther

**Re: weird optimization in sin+cos, x86 backend***From:*Michael Matz

**Re: weird optimization in sin+cos, x86 backend***From:*Robert Dewar

**Re: weird optimization in sin+cos, x86 backend***From:*Vincent Lefevre

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |