atan()

Declaration

double atan(double dX);

Description:

This function returns the inverse tangent of the passed-in argument.

Overloads

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

Related Functions

float atanf(float);
long double atanl(long double);

* Note: Since C does not allow function overloading, these other versions of this function exist.

Domain

(-∞, ∞)

Range

(-Π/2, Π/2)

Periodicity

None

Symmetry

Origin

Asymptotes

None





Example

#include <iostream>
#include <cmath>

int main() {
    using namespace std;

    double dX = -1000.0;
    cout << "x = " << dX << "  atan(x) = " << atan(dX) << endl;

    dX = 1.8;
    cout << "x = " << dX << "  atan(x) = " << atan(dX) << endl;

    return 0;
}

Output:

atan() Output