hyp
Hyperbolic Functions
Hyperbolic trigonometric functions and their inverses.
Functions
sinh,cosh,tanh- Hyperbolic sine, cosine, tangentasinh,acosh,atanh- Inverse hyperbolic functions
Gas Costs (f128)
| Function | Gas |
|---|---|
| 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
| cosh | Calculates the hyperbolic cosine: (e^x + e^-x) / 2… |
| sinh | Calculates the hyperbolic sine: (e^x - e^-x) / 2… |
| tanh | Calculates the hyperbolic tangent: sinh(x) / cosh(x)… |
| acosh | Calculates the inverse hyperbolic cosine: ln(x + sqrt(x² - 1))… |
| asinh | Calculates the inverse hyperbolic sine: ln(x + sqrt(x² + 1))… |
| atanh | Calculates the inverse hyperbolic tangent: ln((1 + x) / (1 - x)) / 2… |