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]

Re: weird optimization in sin+cos, x86 backend


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]