June 2025
Intermediate to advanced
515 pages
17h 5m
English
Euler’s formula describes the projections of a complex number z with the magnitude r = |z| and the angle
on the real and imaginary axes of the Gaussian number plane. The following equation applies:
![]()
Listing 8.2 compares whether the following calculations provide the same values:
z1=r*np.exp(1j*phi)z2=r*np.cos(phi)+1j*r*np.sin(phi)
01 #02_euler.py02 import numpy as np03 r=1004 phi=np.radians(30)05 z1=r*np.exp(1j*phi)06 z2=r*np.cos(phi)+1j*r*np.sin(phi)07 #Outputs08 print("z1:",z1)09 print("z2:",z2)10 print("Magnitude z1:" ...
Read now
Unlock full access