Python Tutorial Python Advanced Python References Python Libraries

Python cmath - asin() Function

The Python cmath.asin() function returns arc sine of a complex number z. It is a function on complex plane, and has two branch cuts:

  • Extends right from 1 along the real axis to ∞, continuous from below.
  • Extends left from -1 along the real axis to -∞, continuous from above.

Mathematically, it can be expressed as:

complex asin

For any z, asin(z) = acos(-z) - 𝜋/2




z Required. Specify the complex number.

Return Value

Returns the complex arc sine of z.


In the example below, asin() function is used to find out the complex arc sine of a given complex number.

import cmath

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

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

The output of the above code will be:

cmath.asin(z1): (0.7542491446980459+1.7343245214879666j)
cmath.asin(z2): (1.5707963267948966+1.3169578969248166j)
cmath.asin(z3): 1.4436354751788103j

❮ Python cMath Module