COMPLEXD - Functions to manipulate double-precision complex numbers
dcadd add two dcomplex numbers
dcsub subtract two dcomplex numbers
dcmul multiply two dcomplex numbers
dcdiv divide two dcomplex numbers
dcmplx make a dcomplex number from two real numbers
dconjg dcomplex conjugate of a dcomplex number
dcneg negate a dcomplex number
dcinv invert a dcomplex number
dcsqrt dcomplex square root of a dcomplex number
dcexp dcomplex exponential of a dcomplex number
dcrmul multiply a dcomplex number by a real number
drcabs real magnitude of a dcomplex number
Structure:
typedef struct _dcomplexStruct { dcomplex number
double r,i;
} dcomplex;
Function Prototypes:
dcomplex dcadd (dcomplex a, dcomplex b);
dcomplex dcsub (dcomplex a, dcomplex b);
dcomplex dcmul (dcomplex a, dcomplex b);
dcomplex dcdiv (dcomplex a, dcomplex b);
double drcabs (dcomplex z);
dcomplex dcmplx (double re, double im);
dcomplex dconjg (dcomplex z);
dcomplex dcneg (dcomplex z);
dcomplex dcinv (dcomplex z);
dcomplex dcsqrt (dcomplex z);
dcomplex dcexp (dcomplex z);
dcomplex dcrmul (dcomplex a, double x);
Notes:
The function "drcabs" was originally called "fcabs". This produced
a collision on some systems so a new name was chosen.
Reference:
Adapted from Press et al, 1988, Numerical Recipes in C (Appendix E).
Author: Dave Hale, Colorado School of Mines, 06/02/89
Modified: Dave Hale, Colorado School of Mines, 04/26/90
Added function dcinv().