19 if (!function_exists(__NAMESPACE__ .
'\\atanh')) {
20 function atanh($complex):
Complex 22 $complex = Complex::validateComplexArgument($complex);
24 if ($complex->isReal()) {
25 $real = $complex->getReal();
26 if ($real >= -1.0 && $real <= 1.0) {
27 return new Complex(\atanh($real));
29 return new Complex(\atanh(1 / $real), (($real < 0.0) ? M_PI_2 : -1 * M_PI_2));
33 $iComplex = clone $complex;
34 $iComplex = $iComplex->invertImaginary()
36 return atan($iComplex)