arc tangent function of one variable

You're viewing an older version of this page (#3336). View the current version.

View versions (4)

NAME

atan

INTERFACE

#include <math.h> double atan ( double x ) long atanl ( long double x ) float atanf ( float x )

DESCRIPTION

The atan function computes the principal value of the arc tangent of x, returning a value in the range [-\pi/2, + \pi/2]

The arc tangent is often also donated as tan^{-1}(x). This is a multi-valued function of the following form:

arctan.gif

Example 1

#include <stdio.h>
#include <math.h>

int main(void)
{
  double result, x=0.5;
  result = atan(x);
  printf("The arc tan of %lf is %lf\n", x, result);
}

output

The arc tan of 0.500000 is 0.463648

SPECIAL VALUES

atan ( &plusmn;0 ) returns &plusmn;0. atan ( &plusmn;&infin; ) returns &plusmn;pi/2

SEE ALSO

acos , asin, atan2, cos, cosh, sin, sinh, tan, tanh

STANDARDS

The atan function conforms to ISO/IEC 9899:1999(E).