This is the mail archive of the
mailing list for the GCC project.
Re: weird optimization in sin+cos, x86 backend
On 2/3/2012 10:28 AM, Vincent Lefevre wrote:
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
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:
Note that there have been other (somewhat different) complaints in
the past, e.g.