math.tanh

Full name
math.tanh
Library
math
Syntax

math.tanh(x)

Description

The math.tanh function returns the hyperbolic tangent of the number passed as an argument.

The hyperbolic tangent function has the following graph:

math.tanh
Parameters
  • x: Number from which to obtain the hyperbolic tangent.
Result

The math.tanh function returns a real number.

Examples

We can obtain the hyperbolic tangent of the number 0.5 with the following code:

math.tanh (0.5)
0.46211715726000974
Submitted by admin on Tue, 02/16/2021 - 09:18