For
${x}^{2}\le \frac{1}{2}$ it is based on the Chebyshev expansion
where
$-\frac{1}{\sqrt{2}}\le x\le \frac{1}{\sqrt{2}}$,
$\text{\hspace{1em}}-1\le t\le 1$,
$\text{\hspace{1em} and \hspace{1em}}t=4{x}^{2}-1$.
If on entry
${\mathbf{ifail}}=0$ or
$-1$, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
If
$\delta $ and
$\epsilon $ are the relative errors in the argument and result, respectively, then in principle
That is, the relative error in the argument,
$x$, is amplified by at least a factor
$\frac{x}{\left(1-{x}^{2}\right)\mathrm{arctanh}x}$ in the result. The equality should hold if
$\delta $ is greater than the
machine precision (
$\delta $ due to data errors etc.) but if
$\delta $ is simply due to round-off in the machine representation then it is possible that an extra figure may be lost in internal calculation round-off.
The behaviour of the amplification factor is shown in the following graph:
Figure 1
The factor is not significantly greater than one except for arguments close to
$\left|x\right|=1$. However in the region where
$\left|x\right|$ is close to one,
$1-\left|x\right|\sim \delta $, the above analysis is inapplicable since
$x$ is bounded by definition,
$\left|x\right|<1$. In this region where arctanh is tending to infinity we have
which implies an obvious, unavoidable serious loss of accuracy near
$\left|x\right|\sim 1$, e.g., if
$x$ and
$1$ agree to
$6$ significant figures, the result for
$\mathrm{arctanh}x$ would be correct to at most about one figure.
None.