#include <math.h> double sin(double x); double cos(double x); double tan(double x); double asin(double x); double acos(double x); double atan(double x); double atan2(double y, double x);
Asin returns the arc sine in the range -pi/2 to pi/2.
Acos returns the arc cosine in the range 0 to pi.
Atan returns the arc tangent in the range -pi/2 to pi/2.
Atan2 computes the principal value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of the return value. The arc tangent returned is in the range [- pi , + pi ]
In the codes that run on other machines, P differs from pi by a fraction of an ulp; the difference matters only if the argument x is huge, and even then the difference is likely to be swamped by the uncertainty in x. Besides, every trigonometric identity that does not involve pi explicitly is satisfied equally well regardless of whether P = pi. For instance, sin(x)**2+cos(x)**2 = 1 and sin(2x) = 2sin(x)cos(x) to within a few ulps no matter how big x may be. Therefore the difference between P and pi is most unlikely to affect scientific and engineering computations.