Math.tanh
Math.tanh
Function
Hyperbolic tangent. Returns the hyperbolic tangent of value.
Syntax
Math.tanh(value)
Parameters
| Parameters | Type | Required | Default value | Description |
|---|---|---|---|---|
| value | Number | Yes | None | The number involved in the calculation. |
Return value
| Type | Description |
|---|---|
| Int/Float | Returns the hyperbolic tangent of value. An Int is returned for integer results, and a Float for non-integer or non-finite results. |
Example
result = Math.tanh(0) // Output: 0 print result
Notes
- Internally uses Rust f64's tanh operation.