Chapter Contents |
Previous |
Next |
atan |
Portability: | ISO/ANSI C conforming, UNIX compatible |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
DIAGNOSTICS | |
EXAMPLE | |
RELATED FUNCTIONS | |
SEE ALSO |
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:
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 (-
/2, /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) = %f\n", value, pival); }
RELATED FUNCTIONS |
acos
,
asin
,
atan2
,
_matherr
SEE ALSO |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.