input value
hyperbolic arctangent (in radians)
var v = atanh( 0.0 );
// returns 0.0
var v = atanh( 0.9 );
// returns ~1.472
var v = atanh( 1.0 );
// returns Infinity
var v = atanh( -1.0 );
// returns -Infinity
var v = atanh( NaN );
// returns NaN
Computes the hyperbolic arctangent of a number.
Notes
x
is restricted to[-1,1]
. If|x| > 1
, the function returnsNaN
.