Re: [AD] sincos

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I first wanted to make it inline, but then I realized a little problem
> with this: the C version, which just calls sin() and cos(), would
> require either allegro.h or the user to #include <math.h>, which is not
> so nice.

I originally intended it to be private to Allegro, so that only math3d.c,
quad.c and rotate.c would use it. Do you think we should expose it to the
user ?

> I have three suggestions:
>
>  (1) Put the C version in a c file while keeping the assembler versions
> inlined.
>  (2) Don't inline the functions.
>  (3) Include math.h.
>
> Any preferences? (I vote for (2), since sincos() is rather slow anyway.
> A comparision with djgpp's sincos() indicates that the difference is
> within the uncertainty of the measurement, even though djgpp's version
> does extra checks on the parameters and is non-inline).

Do you mean that calling sincos() takes as much time as calling sin() then
cos() ? Even at the CPU level ? Ouch! Then we have just been fooled by the
Intel engineers ;-)

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/