atan() Calculate Arc Tangent
#include <math.h>
double atan(x); arc tangent value (in radians)
double x; tangent value
atan() returns the arc tangent of 'x' in radians. The return value
will be in the range -pi/2 to pi/2. All values of 'x' are legal.
Returns: Arc tangent of 'x'.
Notes: atan() does not return any errors.
-------------------------------- Example ---------------------------------
The following statements print the arc tangent of -1.0.
#include <math.h> /* Required for function definition only */
#include <stdio.h> /* for printf() */
main()
{
double arc_tan;
arc_tan = atan(-1.0); /* arc_tan = -pi/4 (-0.7853982) */
printf("arc tangent of -1 is %.7f radians\n", arc_tan);
}
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster