atanh

Calculates the inverse hyperbolic tangent of x, returning a value from ranging from -1 to 1.

Mathematically, atanh(x) = log( (1+x)/(1-x) ) / 2

$1 $2


Special Values
xacosh(x)
NaNNaN
±0±0
-∞-0
  1. real atanh(real x)
  2. double atanh(double x)
  3. float atanh(float x)
    @safe pure nothrow @nogc
    float
    atanh
    (
    float x
    )

Examples

import std.math.traits : isIdentical, isNaN;

assert(isIdentical(atanh(0.0), 0.0));
assert(isIdentical(atanh(-0.0),-0.0));
assert(isNaN(atanh(real.nan)));
assert(isNaN(atanh(-real.infinity)));
assert(atanh(0.0) == 0);

Meta