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: Sine and Cosine Accuracy


On Fri, May 27, 2005 at 12:26:13AM +0200, Gabriel Dos Reis wrote:
> If it was and angle!  Not everything that is an argument to sin or cos
> is an angle.  They are just functions!  Suppose you're evaluating an
> approximation of a Fourrier series expansion.

If you're evaluating it at the floating point value 2^90 you're just
evaluating a fancy prng.  Floating point values represent intervals,
and when the interval size is way bigger than 2pi any value in [-1,1]
is a perfectably acceptable answer for sin or cos.

  OG.


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