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?
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.