procedure strcpx: convert string to complex number procedure cpxstr: return complex number as string procedure cpxadd: complex add procedure cpxsub: complex subtract procedure cpxmul: complex multiply procedure cpxdiv: complex divide procedure cpxconj: complex conjugate procedure cpxabs: complex absolute value
link complex
May 26, 2010; Ralph E. Griswold
This file is in the public domain.
The following procedures perform operations on complex numbers. complex(r,i) create complex number with real part r and imaginary part i cpxabs(z) compute absolute value of complex number z cpxadd(z1, z2) add complex numbers z1 and z2 cpxconj(z) compute conjugate of complex number z cpxdiv(z1, z2) divide complex number z1 by complex number z2 cpxmul(z1, z2) multiply complex number z1 by complex number z2 cpxsub(z1, z2) subtract complex number z2 from complex number z1 cpxstr(z) convert complex number z to string representation strcpx(s) convert string representation s of complex number to complex number