7 IMPLICIT REAL*8 (a-h,o-z)
8 REAL*8 q(4),p(4),
xr(3),pr(3)
12 xr(1)=q(1)**2-q(2)**2-q(3)**2+q(4)**2
13 xr(2)=2.d0*(q(1)*q(2)-q(3)*q(4))
14 xr(3)=2.d0*(q(1)*q(3)+q(2)*q(4))
16 r=q(1)**2+q(2)**2+q(3)**2+q(4)**2
18 pr(1)=(q(1)*p(1)-q(2)*p(2)-q(3)*p(3)+q(4)*p(4))*a
19 pr(2)=(q(2)*p(1)+q(1)*p(2)-q(4)*p(3)-q(3)*p(4))*a
20 pr(3)=(q(3)*p(1)+q(4)*p(2)+q(1)*p(3)+q(2)*p(4))*a