COMPLEX-ATANH-BOGUS-FORMULAATANH in CLtL is incorrect, apparently because of a mistranscription of a formula from Penfield's article.
CLtL has: arctanh z = log ((1+z) sqrt(1 - (1 / z^2)))
Should be: arctanh z = log ((1+z) sqrt(1 / (1 - z^2)))
However, given the change to ATAN in issue COMPLEX-ATAN-BRANCH-CUT, it seems simpler to follow Kahan's recommendation and define
arctanh z = (log(1+z) - log(1-z))/2
thereby preserving the identity i arctan z = arctanh iz .
Kahan also notes that Penfield's formula for arccosh (CLtL p. 213)
arccosh z = log(z + (z + 1) sqrt((z-1)/(z+1)))
has a gratuitous removable singularity at z=-1 and recommends
arccosh z = 2 log(sqrt((z+1)/2) + sqrt((z-1)/2))
which has the same values and is also well-defined at z=-1.
Finally, Kahan recommends a different defining formula for acos that is more similar to that of acosh (but less similar to that of asin).
arctanh z = log ((1+z) sqrt(1 - (1 / z^2))) with arctanh z = (log(1+z) - log(1-z))/2
(2) Note that i arctan z = arctanh iz .
(3) Replace the gratuitously singular formula
arccosh z = log(z + (z + 1) sqrt((z-1)/(z+1))) with arccosh z = 2 log(sqrt((z+1)/2) + sqrt((z-1)/2))
(4) Adopt the formula (already in CLtL)
arccos z = (pi / 2) - arcsin z
as the official definition of arccos, and also note that the formulas
arccos z = -i log(z + i sqrt(1 - z^2))
(already in CLtL) and
arccos z = 2 log(sqrt((1+z)/2) + i sqrt((1-z)/2)) / i
(recommended by Kahan) are equivalent.
ATANH rather than slavishly following the bogus CLtL formula.ATANH must be rewritten. It is not a very difficult fix.
Possibly ACOSH must be rewritten. It is not a very difficult fix.
ATANH.
Incompatibility with HP calculators.
IEEE 754 arithmetic.