Home >>Python math Module >Python math.tanh() Method
Python math.tanh() method in python is used to returns hyperbolic tangent of a given number and it accepts a number.
Syntax:math.tanh(x)
Parameter | Description |
---|---|
x | It is required parameter and is used to find the hyperbolic tangent of a given number |
import math
print(math.tanh(5))
print(math.tanh(4))
print(math.tanh(-8.4))
import math
x = 5
print("math.tanh(",x,"): ", math.tanh(x))
x = 4.7
print("math.tanh(",x,"): ", math.tanh(x))
x = 1.36
print("math.tanh(",x,"): ", math.tanh(x))
x = 0
print("math.tanh(",x,"): ", math.tanh(x))
x = 12.32
print("math.tanh(",x,"): ", math.tanh(x))