c++ libstd compute sin and cos simultaneously

galinette picture galinette · Jun 20, 2014 · Viewed 8.3k times · Source

In C library math.h, there was a sincos function which was pretty efficient, because it computed both sine and cosine in a time closer to a single call to sin() or cos() than to the total time of calling both.

Is there such function in C++ standard library?

Answer

Ali picture Ali · Jun 20, 2014

Is there no such function in c++ standard library?

No, unfortunately there isn't.

In C library math.h, there was a sincos function

On Linux, it is available as GNU Extension. It's not standard in C either.