Reference · Math

math.acosh

signature
math.acosh(num) -> float

What it does

The inverse hyperbolic cosine: the number, zero or above, whose math.cosh is the argument, as a float, as Python's math.acosh. The argument must be 1 or more.

Examples

print(math.acosh(1), math.acosh(2), math.acosh(10))print(math.acosh(math.cosh(2)))
output
0.0 1.3169578969248166 2.9932228461263812.0

Edge cases

print(math.acosh(1), math.acosh(math.cosh(-2)))print(math.acosh(1e300), math.log(2e300))print(math.acosh(math.inf), math.acosh(math.nan))
output
0.0 2.0691.4686750787736 691.4686750787737inf NaN

Errors

A number below 1 is a runtime error (a domain error), not an error value: it stops the request, and ?? does not catch it. A value that is not a number is a runtime error too.

this one fails
print(math.acosh(0.5))
output
line 1: `math.acosh`: math domain error (0.5)
this one fails
print(math.acosh(-1))
output
line 1: `math.acosh`: math domain error (-1)

Chaining

print(2 | math.acosh)print([1, 2, 3] | map(math.acosh))
output
1.3169578969248166[0.0, 1.3169578969248166, 1.762747174039086]

See also

math.cosh, math.asinh, math.atanh, math.log

Thread
8Useful? Like it, or add to its thread below.

Thread 0 posts

On math.acosh(): 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