Computes the arc tangent.
#include <math.h>
float atanf (x)
float x;
long double atanl (x)
long double x;
double atan (x)
double x;
_Decimal32 atand32 (x)
_Decimal32 x;
_Decimal64 atand64 (x)
_Decimal64 x;
_Decimal128 atand128 (x)
_Decimal128 x;
The atanf, atanl, atan, atand32, atand64, and atand128 subroutines compute the principal value of the arc tangent of the x parameter.
An application wishing to check for error situations should set the errno global variable to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.
Item | Description |
---|---|
x | Specifies the value to be computed. |
Upon successful completion, the atanf, atanl, atan, atand32, atand64, and atand128 subroutines return the arc tangent of x in the range [-pi /2, pi/2] radians.
If x is NaN, a NaN is returned.
If x is 0, x is returned.
If x is ±Inf, ±x/2 is returned.
If x is subnormal, a range error may occur and x is returned.