#include <math.h>
double
acos
(double x
);
The acos function computes the principal value of the arc cosine of x. A domain error occurs for arguments not in the range [-1, +1].
The acos function returns the arc cosine in the range [0, pi] radians.
For arguments < -1.0, asin returns -pi/2 and sets EDOM.
For arguments > +1.0, asin returns +pi/2 and sets EDOM.
#include <math.h>
double
asin
(double x
);
The asin function computes the principal value of the arc sine of x. A domain error occurs for arguments not in the range [-1, +1].
The asin function returns the arc sine in the range [-pi/2, +pi/2] radians.
For arguments < -1.0, asin returns -pi/2 and sets EDOM.
For arguments > +1.0, asin returns +pi/2 and sets EDOM.
#include <math.h>
double
atan
(double x
);
The atan function computes the principal value of the arc tangent of x .
The atan function returns the arc tangent in the range [-pi/2, +pi/2] radians.
Section 5.3.4, the atan2 function
#include <math.h>
double
atan2
(double y ,
double x );
The atan2 function 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. A domain error may occur if both arguments are zero.
The atan2 function returns the arc tangent of y/x, in the range [-pi, +pi] radians.
Section 5.3.3, the atan function
None.
#include <math.h>
double
cos
(double x
);
The cos function computes the cosine of x (measured in radians).
The cos function returns the cosine value.
The absolute error over the range -2*pi to +2*pi is less than 2 * DBL_EPSILON.
#include <math.h>
double
sin
(double x
);
The sin function computes the sine of x (measured in radians).
The sin function returns the sine value.
The absolute error over the range -2*pi to +2*pi is less than 2*DBL_EPSILON.
#include <math.h>
double
tan
(double x
);
The tan function returns the tangent of x (measured in radians).
The tan function returns the tangent value.
Over the range -pi/4 to +pi/4, the absolute error is less than 2 * DBL_EPSILON. The absolute error increases considerably as the argument approaches pi/2, or -pi/2.
Where the argument is close to any other odd multiple of pi/2, then floating point overflow may be detected and HUGE_VAL or -HUGE_VAL will be returned. If the corresponding interrupt is unmasked then the signal SIGFPE will be raised.