You are here : Cmath.hatan

atan() - math.h

The C library function double atan(double x) returns the arc tangent of x in radians.


Syntax

double atan(double x)


Example

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

#define PI 3.14159265

int main ()
{
   double x, ret, val;
   x = 1.0;
   val = 180.0 / PI;

   ret = atan (x) * val;
   printf("The arc tangent of %lf is %lf degrees", x, ret);
   
   return(0);
}


Output / Return Value

The arc tangent of 1.000000 is 45.000000 degrees


Limitations


Alternatives / See Also


Reference