amath
1.8.5
Simple command line calculator
|
Inverse hyperbolic tangent function. More...
#include "prim.h"
Go to the source code of this file.
Functions | |
double | atanh (double x) |
Inverse hyperbolic tangent function. More... | |
Variables | |
static const double | one = 1.0 |
static const double | huge = 1e300 |
static double | zero = 0.0 |
Inverse hyperbolic tangent function.
Definition in file atanh.c.
double atanh | ( | double | x | ) |
Inverse hyperbolic tangent function.
Method1.Reduced x to positive by atanh(-x) = -atanh(x) 2.For x>=0.5 1 2x x atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------) 2 1 - x 1 - x For x<0.5 atanh(x) = 0.5*log1p(2x+2x*x/(1-x))
Special cases atanh(x) is NaN if |x| > 1 atanh(NaN) is that NaN atanh(+-1) is +-INF
Definition at line 72 of file atanh.c.
References huge, log1p(), one, and zero.
Referenced by RealNumber::HypArcTangent().