Project

General

Profile

« Previous | Next » 

Revision e49ecaed

Added by nobu (Nobuyoshi Nakada) over 5 years ago

Optimize sin/cos

GCC/Clang can optimize to calculate sin(x) and cos(x) at once,
when the both are closely called on the same argument.

Similar optimization is possible for __sinpi(x) and __cospi(x)
if available, which calculate arguments in radian, i.e.
sin(x*M_PI) and cos(x*M_PI) respectively.