Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

hyp

Hyperbolic Functions

Hyperbolic trigonometric functions and their inverses.

Functions

  • sinh, cosh, tanh - Hyperbolic sine, cosine, tangent
  • asinh, acosh, atanh - Inverse hyperbolic functions

Gas Costs (f128)

FunctionGas
sinh~225,000
cosh~225,000
tanh~227,000
asinh~260,000
acosh~455,000
atanh~280,000

Use Cases

  • Physics simulations (catenary curves, special relativity)
  • Machine learning (activation functions)
  • Signal processing

Fully qualified path: cairo_fp::f128::math::hyp

Free functions

coshCalculates the hyperbolic cosine: (e^x + e^-x) / 2…
sinhCalculates the hyperbolic sine: (e^x - e^-x) / 2…
tanhCalculates the hyperbolic tangent: sinh(x) / cosh(x)…
acoshCalculates the inverse hyperbolic cosine: ln(x + sqrt(x² - 1))…
asinhCalculates the inverse hyperbolic sine: ln(x + sqrt(x² + 1))…
atanhCalculates the inverse hyperbolic tangent: ln((1 + x) / (1 - x)) / 2…