sincos as a macro

Brian Gough bjg@network-theory.co.uk
Thu Apr 22 16:38:00 GMT 2004


Alexei Podtelezhnikov writes:
 > I have stumbled upon multiple occurances of
 >   *x = cos (t); *y = sin (t);
 > As far as I know even -ffast-math does not yet calls for fsincos
 > i87 instruction. I often use a dangerous macro and call gcc
 > -DWITH_SINCOS.  or one can come up with a function.

(See the function sincos() in the GNU C library).

I think the next version of GCC is going to include the fsincos
optimization automatically.  There was a discussion on the GCC mailing
list recently about it.

-- 
Brian Gough



More information about the Gsl-discuss mailing list