
C====INTEGRATION BY SIMPSON FORMULA=====
      SUBROUTINE  SIMPS(NE,H,R7,P)
      INTEGER NE,IPARI
      REAL*8 S,S1,R7(*),H,P

      S=0.0
      S1=S
      DO 20 I=3,NE+1,2
      S=S+R7(I)
      S1=S1+R7(I+1)
C      IF(I.EQ.401.OR.I.EQ.501.OR.I.EQ.601)
C     WRITE(6,5)I,R7(I),S,S1
C 5    FORMAT('i s,s1',I5,3E15.8)
 20   CONTINUE
       S=R7(2)+4.*S+2.*S1-R7(NE+1)
      IF (IPARI(NE+1).GT.0) S=S+(9.*R7(NE+1)-
     * R7(NE-1))/4.+R7(NE)
       P=S*H/3.
C     WRITE(6,15)S,P
C 15    FORMAT(' s,p',2E15.8)
      RETURN
      END
