acosh

Calculates the inverse hyperbolic cosine of x.

Mathematically, acosh(x) = log(x + sqrt( x*x - 1))

$1 $2
Special Values
xacosh(x)
NaNNaN
<1NaN
10
+∞+∞
  1. real acosh(real x)
  2. double acosh(double x)
  3. float acosh(float x)
    @safe pure nothrow @nogc
    float
    acosh
    (
    float x
    )

Examples

import std.math.traits : isIdentical, isNaN;

assert(isNaN(acosh(0.9)));
assert(isNaN(acosh(real.nan)));
assert(isIdentical(acosh(1.0), 0.0));
assert(acosh(real.infinity) == real.infinity);
assert(isNaN(acosh(0.5)));

Meta