5 extern double f__cabs (double, double);
7 z_sqrt (doublecomplex
* r
, doublecomplex
* z
)
9 double mag
, zi
= z
->i
, zr
= z
->r
;
11 if ((mag
= f__cabs (zr
, zi
)) == 0.)
15 r
->r
= sqrt (0.5 * (mag
+ zr
));
20 r
->i
= sqrt (0.5 * (mag
- zr
));