cosh()

Declaration

double cosh(double dX);

Description:

This function returns the hyperbolic cosine of the passed-in argument.

Overloads

float cosh(float);
double cosh(double);
long double cosh(long double);

Related Functions

float coshf(float);
long double coshl(long double);

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

Domain

(-∞, ∞)

Range

[1, ∞)

Periodicity

None

Symmetry

Y-axis

Asymptotes

None





Example

#include <iostream>
#include <cmath>

int main() {
    using namespace std;

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

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

    return 0;
}

Output:

cosh() Output