cosh

Calculates the hyperbolic cosine of x.

Special Values
xcosh(x)invalid?
±∞±0.0no
  1. real cosh(real x)
  2. double cosh(double x)
  3. float cosh(float x)
    @safe pure nothrow @nogc
    float
    cosh
    (
    float x
    )

Examples

import std.math.constants : E;
import std.math.operations : isClose;

assert(cosh(0.0) == 1.0);
assert(cosh(1.0).isClose((E + 1.0 / E) / 2));

Meta