Python - cmath.tanh() function Last Updated : 01 Jun, 2020 Comments Improve Suggest changes Like Article Like Report cmath is Python built-in module that is used for complex number mathematics. cmath module has a method tanh() that returns hyperbolic tangent of the complex number passed to it. Syntax: cmath.tanh(Z) Parameter: It requires only one parameter i.e the number for which hyperbolic tangent needs to be calculated. Return: Returns a complex number that is the hyperbolic tangent of the number passed. Example 1: Python3 # Import the Library import cmath # Printing the result print (cmath.tanh(1 + 5j)) Output: (1.2407479829240697-0.18610947764730415j) Example 2: In this example real number is passed but the returned result is still a complex number. Python3 # Import the Library import cmath # Printing the result print (cmath.tanh(1)) Output: (0.7615941559557649+0j) Example 3: In this example no argument is passed in this case TypeError will be thrown Python3 # Import the Library import cmath # Printing the result print (cmath.tanh()) Output: TypeError: tanh() takes exactly one argument (0 given) Comment More infoAdvertise with us Next Article Python - cmath.tanh() function A aman neekhara Follow Improve Article Tags : Python Python Cmath-library Practice Tags : python Similar Reads Python - cmath.tan() function cmath is Python built-in module that is used for complex number mathematics. cmath module has a method tan() that returns tangent of the complex number passed to it. Syntax: cmath.tan(Z) Parameter: It requires only one parameter i.e the number for which tangent needs to be calculated. Return: Return 1 min read Python - cmath.sinh() function cmath is python built-in module that is used for complex number mathematics. cmath module has a method sinh() that returns hyperbolic sine of the complex number passed to it. Syntax: cmath.sinh(Z) Parameter: It requires only one parameter i.e the number for which hyperbolic sine needs to be calculat 1 min read Python - cmath.sin() function cmath is Python built-in module that is used for complex number mathematics. cmath module has a method sin() that returns sine of the complex number passed to it. Syntax: cmath.sin(Z) Parameter: It requires only one parameter i.e the number for which sine needs to be calculated. Return: Returns a co 1 min read Python - cmath.cos() function cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.cos() function returns the cosine value of a complex number. The value passed in this function can be int, float, and complex numbers. Syntax: cmath.cos(x) Parameter:This method accep 1 min read Python - cmath.cosh() function cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.cosh() function returns the hyperbolic cosine value of a complex number. The value passed in this function can be int, float, and complex numbers. Syntax: cmath.cosh(x) Parameter:This 1 min read Like