3 extern void sig_die (char *, int);
5 z_div (doublecomplex
* c
, doublecomplex
* a
, doublecomplex
* b
)
10 if ((abr
= b
->r
) < 0.)
12 if ((abi
= b
->i
) < 0.)
18 #ifdef IEEE_COMPLEX_DIVIDE
19 if (a
->i
!= 0 || a
->r
!= 0)
21 c
->i
= c
->r
= abi
/ abr
;
24 sig_die ("complex division by zero", 1);
28 den
= b
->i
* (1 + ratio
* ratio
);
29 cr
= (a
->r
* ratio
+ a
->i
) / den
;
30 c
->i
= (a
->i
* ratio
- a
->r
) / den
;
36 den
= b
->r
* (1 + ratio
* ratio
);
37 cr
= (a
->r
+ a
->i
* ratio
) / den
;
38 c
->i
= (a
->i
- a
->r
* ratio
) / den
;