5.3. Trigonometric Functions

5.3.1. The acos function

Synopsis
#include <math.h>

double acos (double x );

Description

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

Returns

The acos function returns the arc cosine in the range [0, pi] radians.

Implementation Notes

5.3.2. The asin function

Synopsis
#include <math.h>

double asin (double x );

Description

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

Returns

The asin function returns the arc sine in the range [-pi/2, +pi/2] radians.

Implementation Notes

5.3.3. The atan function

Synopsis
#include <math.h>

double atan (double x );

Description

The atan function computes the principal value of the arc tangent of x .

Returns

The atan function returns the arc tangent in the range [-pi/2, +pi/2] radians.

See Also

Section 5.3.4, the atan2 function

5.3.4. The atan2 function

Synopsis
#include <math.h>

double atan2 (double y , double x );

Description

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.

Returns

The atan2 function returns the arc tangent of y/x, in the range [-pi, +pi] radians.

See Also

Section 5.3.3, the atan function

Implementation Notes

None.

5.3.5. The cos function

Synopsis
#include <math.h>

double cos (double x );

Description

The cos function computes the cosine of x (measured in radians).

Returns

The cos function returns the cosine value.

Implementation Notes

5.3.6. The sin function

Synopsis
#include <math.h>

double sin (double x );

Description

The sin function computes the sine of x (measured in radians).

Returns

The sin function returns the sine value.

Implementation Notes

5.3.7. The tan function

Synopsis
#include <math.h>

double tan (double x );

Description

The tan function returns the tangent of x (measured in radians).

Returns

The tan function returns the tangent value.

Implementation Notes