Calculates the trigonometric arc tangent function of a double precision floating-point value.
Include
<math.h>
Prototype
double atanl(double x);
Argument
x
Return Value
Returns the arc tangent in radians in the range of -pi/2 to +pi/2 (inclusive).
Remarks
No domain or range error will occur.
Example
#include <math.h>
#include <stdio.h>
int main(void)
{
long double x, y;
x = 2.0;
y = atanl(x);
printf("The arctangent of %Lf is %Lf\n", x, y);
x = -1.0;
y = atanl(x);
printf("The arctangent of %Lf is %Lf\n", x, y);
}
Example Output
The arctangent of 2.000000 is 1.107149
The arctangent of -1.000000 is -0.785398