atan -- Compute the Trigonometric Arc Tangent


SYNOPSIS
#include <math.h>
double atan(double x);
DESCRIPTION
atan
computes the trigonometric arc tangent of its argument x
.
The arc tangent is the inverse of the tangent function and is expressed by the
following relation:
r = arctan (x)
RETURN VALUE
atan
returns the principal value of the arc tangent of the argument
x
, provided that this value is defined and computable. The return
value is a double-precision, floating-point number in the open interval
(-pi/2, pi/2) radians.
DIAGNOSTICS
If an error occurs in atan
, the _matherr
routine is called.
You can supply your own version of _matherr
to suppress the diagnostic
message or modify the value returned.
EXAMPLE
This example computes pi as 4 times the arc tangent of 1:
#include <math.h>
#include <stdio.h>
main()
{
double pival, value;
value = 1.000;
pival = 4 * atan(value);
printf("4 * atan(%f) = %fn", value, pival);
}
RELATED FUNCTIONS
acos
, asin
, atan2
, _matherr
SEE ALSO
Mathematical Functions