Sine and Cosine Accuracy
Paul Koning
pkoning@equallogic.com
Thu May 26 17:41:00 GMT 2005
>>>>> "Kevin" == Kevin Handy <kth@srv.net> writes:
Kevin> But, you are using a number in the range of 2^90, only have 64
Kevin> bits for storing the floating point representation, and some
Kevin> of that is needed for the exponent.
Fair enough, so with 64 bit floats you have no right to expect an
accurate answer for sin(2^90). However, you DO have a right to expect
an answer in the range [-1,+1] rather than the 1.2e+27 that Richard
quoted. I see no words in the description of
-funsafe-math-optimizations to lead me to expect such a result.
paul
More information about the Gcc
mailing list