7 IMPLICIT REAL*8 (a-h,m,o-z)
8 common/azreg/ time3,tmax,q(8),p(8),r1,r2,r3,
energy,m(3),x3(3,3),
9 & xdot3(3,3),cm(10),c11,c12,c19,c20,c24,c25,
10 & nstep3,name3(3),kz15,kz27
11 REAL*8 q1(9),p1(9),q2(9),p2(9)
15 IF (kdum.EQ.4) go to 4
16 IF (kdum.GT.1) go to 20
22 zke = zke + m(i)*(xdot3(1,i)**2 + xdot3(2,i)**2 +
25 pot = pot - m(i)*m(j)/sqrt((x3(1,i) - x3(1,j))**2 +
26 & (x3(2,i) - x3(2,j))**2 +
27 & (x3(3,i) - x3(3,j))**2)
33 IF (kdum.EQ.0) go to 40
40 p1(i1) = m(i)*xdot3(k,i)
45 c11 = 0.25d0/m(1) + 0.25d0/m(3)
46 c12 = 0.25d0/m(2) + 0.25d0/m(3)
54 q2(k) = q1(k) - q1(k+6)
55 q2(k+3) = q1(k+3) - q1(k+6)
77 rk = sqrt(q1(k+1)**2 + q1(k+2)**2 + q1(k+3)**2)
80 IF (q1(k+1).GE.0.0)
THEN
81 q(k+1) = sqrt(0.5d0*(rk + q1(k+1)))
82 q(k+2) = 0.5d0*q1(k+2)/q(k+1)
83 q(k+3) = 0.5d0*q1(k+3)/q(k+1)
86 q(k+2) = sqrt(0.5d0*(rk - q1(k+1)))
87 q(k+1) = 0.5d0*q1(k+2)/q(k+2)
88 q(k+4) = 0.5d0*q1(k+3)/q(k+2)
93 p(k+1) = 2.0d0*(+q(k+1)*p1(k+1) + q(k+2)*p1(k+2) +
95 p(k+2) = 2.0d0*(-q(k+2)*p1(k+1) + q(k+1)*p1(k+2) +
97 p(k+3) = 2.0d0*(-q(k+3)*p1(k+1) - q(k+4)*p1(k+2) +
99 p(k+4) = 2.0d0*(+q(k+4)*p1(k+1) - q(k+3)*p1(k+2) +
110 q1(k+1) = q(k+1)**2 - q(k+2)**2 - q(k+3)**2 + q(k+4)**2
111 q1(k+2) = 2.0d0*(q(k+1)*q(k+2) - q(k+3)*q(k+4))
112 q1(k+3) = 2.0d0*(q(k+1)*q(k+3) + q(k+2)*q(k+4))
115 p1(k+1) = q(k+1)*p(k+1) - q(k+2)*p(k+2) - q(k+3)*p(k+3) +
117 p1(k+2) = q(k+2)*p(k+1) + q(k+1)*p(k+2) - q(k+4)*p(k+3) -
119 p1(k+3) = q(k+3)*p(k+1) + q(k+4)*p(k+2) + q(k+1)*p(k+3) +
123 rk = q(k+1)**2 + q(k+2)**2 + q(k+3)**2 + q(k+4)**2
126 p1(k+1) = 0.5d0*p1(k+1)/rk
127 p1(k+2) = 0.5d0*p1(k+2)/rk
128 p1(k+3) = 0.5d0*p1(k+3)/rk
139 q2(k+6) = -(m(1)*q1(k) + m(2)*q1(k+3))/(m(1) + m(2) + m(3))
141 q2(k) = q1(k) + q2(k+6)
142 q2(k+3) = q1(k+3) + q2(k+6)
147 p2(k+6) = -(p2(k) + p2(k+3))
156 xdot3(k,i) = p2(i1)/m(i)
160 IF (kdum.EQ.3) go to 40
163 s1 = p2(1)**2 + p2(2)**2 + p2(3)**2
164 s2 = p2(4)**2 + p2(5)**2 + p2(6)**2
165 s3 = p2(7)**2 + p2(8)**2 + p2(9)**2
166 zke = 0.5d0*(s1/m(1) + s2/m(2) + s3/m(3))
167 s1 = m(1)*m(3)/sqrt((q2(7) - q2(1))**2 + (q2(8) - q2(2))**2 +
168 & (q2(9) - q2(3))**2)
169 s2 = m(2)*m(3)/sqrt((q2(7) - q2(4))**2 + (q2(8) - q2(5))**2 +
170 & (q2(9) - q2(6))**2)
171 s3 = m(1)*m(2)/sqrt((q2(4) - q2(1))**2 + (q2(5) - q2(2))**2 +
172 & (q2(6) - q2(3))**2)
173 ht = zke - s1 - s2 - s3