asinh
asinh(x)
Input: x · Output: no output
What it is
Inverse hyperbolics. asinh is defined and finite on the whole real line. acosh is only real for x >= 1; a real x < 1 gives NaN (same convention as sqrt on a negative real — no silent promotion to a complex result), but an explicit Complex argument still evaluates via the complex branch regardless of value. atanh has a pole at x = +-1 (real or complex) — an error, not a silent inf. All three accept Complex as well as real input.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
asinh(x) | x Complexnot documented yet | not documented yet | Inverse hyperbolics. asinh is defined and finite on the whole real line. All three accept Complex as well as real input. |
Examples
No documentation example calls this form yet. The Core maths chapter is where one belongs.
How it works
Inverse hyperbolics, asinh(x) = ln(x + sqrt(x^2+1)), acosh(x) = ln(x + sqrt(x^2-1)), atanh(x) = 0.5*ln((1+x)/ (1-x)) -- real branch via f64's own (accurate, no cancellation) methods, complex branch spelled out from the same identity using Complex64's existing add/sub/mul/ div/sqrt/ln (it has no inverse-hyperbolics of its own). asinh has no pole on either domain. acosh is only real for x >= 1; per the note above (asinh/acosh/atanh section), this follows sqrt(-1)'s existing precedent -- NaN, no silent promotion to a complex result for a REAL argument below 1 -- rather than inventing a new convention; an explicitly complex argument still goes through the complex branch regardless of value, same as sqrt(-1+0i) does today. atanh has real poles at x = +-1 and complex poles at z = +-1 + 0i, checked the same way coth/csch are above rather than silently handing back +-inf.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.