1 SUBROUTINE xzsqrt(AR, AI, BR, BI)
9 DOUBLE PRECISION AR, AI, BR, BI, ZM, DTHETA, DPI, DRT
10 DOUBLE PRECISION XZABS
11 DATA drt , dpi / 7.071067811865475244008443621
d-1,
12 1 3.141592653589793238462643383
d+0/
15 IF (ar.EQ.0.0
d+0) go to 10
16 IF (ai.EQ.0.0
d+0) go to 20
18 IF (dtheta.LE.0.0
d+0) go to 40
19 IF (ar.LT.0.0
d+0) dtheta = dtheta - dpi
21 10
IF (ai.GT.0.0
d+0) go to 60
22 IF (ai.LT.0.0
d+0) go to 70
26 20
IF (ar.GT.0.0
d+0) go to 30
33 40
IF (ar.LT.0.0
d+0) dtheta = dtheta + dpi
34 50 dtheta = dtheta*0.5
d+0
F77_RET_T const double const double double * d
subroutine xzsqrt(AR, AI, BR, BI)