weird optimization in sin+cos, x86 backend
Andreas Schwab
schwab@linux-m68k.org
Sat Feb 4 14:57:00 GMT 2012
Robert Dewar <dewar@adacore.com> writes:
> On 2/4/2012 9:09 AM, Andreas Schwab wrote:
>> Robert Dewar<dewar@adacore.com> writes:
>>
>>> But if you write a literal that can be represented exactly, then it is
>>> perfectly reasonable to expect trig functions to give the proper
>>> result, which is unambiguous in this case.
>>
>> How do you know that the number is exact?
>
> Sorry, what are you asking? Are you asking how do I know 1e22 is
> exact? That's an odd question, anyone who knows the IEEE format
> knows this.
How can the sine function know which of the millions of numbers
represented by 0x1.0f0cf064dd591p+73 are meant? Applying the sine to
this interval covers the whole result domain of the function.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Gcc
mailing list