Python Tutorial Python Advanced Python References Python Libraries

Python cmath - sinh() Function



The Python cmath.sinh() function returns the complex hyperbolic sine of a complex number z. It is a function on complex plane, and has no branch cuts. It is periodic with respect to the imaginary component, with period 2𝜋j.

Mathematically, it can be expressed as:

complex sinh

Syntax

cmath.sinh(z)

Parameters

z Required. Specify a number to find the complex hyperbolic sine of

Return Value

Returns the complex hyperbolic sine of z.

Example:

In the example below, sinh() function is used to find out the complex hyperbolic sine of the given number.

import cmath

z1 = 2 + 2j
z2 = 2
z3 = 2j

print("cmath.sinh(z1):", cmath.sinh(z1))
print("cmath.sinh(z2):", cmath.sinh(z2))
print("cmath.sinh(z3):", cmath.sinh(z3))

The output of the above code will be:

cmath.sinh(z1): (-1.5093064853236158+3.4209548611170133j)
cmath.sinh(z2): (3.626860407847019+0j)
cmath.sinh(z3): (-0+0.9092974268256817j)

❮ Python cMath Module

5