1 SUBROUTINE erel3(IM,EB,SEMI)
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 common/azcoll/ rk(3),qk(8),pk(8),icall,icoll,ndiss3
19 p1(k+1) = qk(k+1)*pk(k+1) - qk(k+2)*pk(k+2) - qk(k+3)*pk(k+3) +
21 p1(k+2) = qk(k+2)*pk(k+1) + qk(k+1)*pk(k+2) - qk(k+4)*pk(k+3) -
23 p1(k+3) = qk(k+3)*pk(k+1) + qk(k+4)*pk(k+2) + qk(k+1)*pk(k+3) +
27 ri = qk(k+1)**2 + qk(k+2)**2 + qk(k+3)**2 + qk(k+4)**2
28 p1(k+1) = 0.5d0*p1(k+1)/ri
29 p1(k+2) = 0.5d0*p1(k+2)/ri
30 p1(k+3) = 0.5d0*p1(k+3)/ri
40 mu2 = m(3-im)*mb/(m(3-im) + mb)
41 vp = 0.5d0*p2/mu2 - m(1)*m(2)/r3 - m(3-im)*m(3)/max(r1,r2)
45 semi = -m(im)*m(3)/(2.0d0*eb)