atan() - Mathematical Function

How is Mathematical Function "atan()" used in C++?
How to find the arc tangent value of an argument using c++?

Explanation

atan() is a Mathematical Function that returns the arc tangent for the given argument.

Syntax to find Arc Tangent Value


float atan ( float arg );
double atan ( double arg );
long double atan ( long double arg );

Example :



#include <iostream.h>
#include <cmath.h>
int main ()
{
cout << "Arc Tangent value of .5 is :: " << atan(.5) ;
return 0;
}

Result :

Arc Tangent value of .5 is :: 0.463648

In the above example atan() is used to find the arc tangent value for ".5".

C++ Tutorial


Ask Questions

Ask Question