From: Javier S. P. <ja...@te...> - 2006-07-24 23:52:50
|
En/na danny mcrae ha escrit: > Why not go with a look-up and linear interpolation? > We could declare the FM that would result from the > inaccuracies a feature--the autofattening sine :) That's essentially the user-defined waveform code. It may work... > We may want to see if it's safe to use -ffast-math > with oscillator. That would get rid of all of the > type checking in the math lib. "unsafe-math-optimizations" doesn't look to be safe :) Someone (else) should test all those. > Also, I have come across at least one version of libc > that implemented sinf as: > > float sinf(float x) > { > return (float) sin((double) x); > } > > I would be disappointed to find out that glibc did > something THAT hokey, but floating point calculations > should be performed 64 bit natively on machines that > support SSE2, so it's not entirely inconceivable that > sinf may be doing something similar to that (though > hopefully without having to set up the frame for a > function call). Huh... I would code like that, even on 32 bit. It's more accurate actually. We should try a fast math library, if we find it :) Bye. |