On Wed, Nov 04, 2015 at 22:08:27 -0500, Ganesh Ajjanagadde wrote:
> This uses the trigonometric double and triple angle formulae to avoid
> repeated (expensive) evaluation of libc's cos().
[...]
> -                y *= 0.3635819 - 0.4891775 * cos(w) + 0.1365995 * cos(2*w) - 
> 0.0106411 * cos(3*w);
> +                y *= 0.3635819 - 0.4891775 * cos(w) + 0.1365995 * 
> (2*cos(w)*cos(w)-1) - 0.0106411 * (4*cos(w)*cos(w)*cos(w) - 3*cos(w));

Q: Does the compilers' optimization ensure that cos(w) is evaluated
only once?

Thanks,
Moritz
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to