exp()

Declaration

double exp(double dX);

Description:

This function returns the exponential with base e of the passed-in argument.

Overloads

float exp(float);
double exp(double);
long double exp(long double);

Related Functions

float expf(float);
long double expl(long double);

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

Domain

(-∞, ∞)

Range

(0, ∞)

Periodicity

None

Symmetry

None

Asymptotes

y = 0





Example

#include <iostream>
#include <cmath>

int main() {
    using namespace std;

    double dX = -10.0;
    cout << "x = " << dX << "  exp(x) = " << exp(dX) << endl;

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

    return 0;
}

Output:

exp() Output