Reference · Math
math.asinh
signature
math.asinh(num) -> floatWhat it does
The inverse hyperbolic sine: the number whose math.sinh is the argument, as a
float, as Python's math.asinh. It takes any number.
Examples
print(math.asinh(0), math.asinh(1), math.asinh(-1))print(math.asinh(math.sinh(2)))output
0.0 0.881373587019543 -0.8813735870195432.0Edge cases
- The function is odd:
math.asinh(-x)is-math.asinh(x). - A huge number is fine; the answer grows like a logarithm:
math.asinh(1e300)is about691. infgivesinf,-infgives-inf,NaNgivesNaN.
print(math.asinh(-3) == -math.asinh(3))print(math.asinh(1e300), math.log(2e300))print(math.asinh(math.inf), math.asinh(-math.inf), math.asinh(math.nan))output
true691.4686750787736 691.4686750787737inf -inf NaNErrors
There is no domain error. A value that is not a number is a runtime error, not an
error value: it stops the request; a decimal is converted first with float.
this one fails
print(math.asinh("1"))output
line 1: `math.asinh` expects a number as argument 1, got strChaining
print(1 | math.asinh)print([0, 1, 10] | map(math.asinh))output
0.881373587019543[0.0, 0.881373587019543, 2.99822295029797]See also
math.sinh, math.acosh, math.atanh, math.log
Thread
Thread 0 posts
On math.asinh(): questions, tips, corrections, and code that uses it.
No posts yet. The first one opens the thread.
Edit this page on GitHub · every example's output was made by running it (tools/refcheck.mjs) · questions on Discord or r/quillo