      SUBROUTINE VPETST (ER, FP, TM)
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
C
C   VPENTA TEST PROGRAM
C
      PARAMETER (NJA=128, NJB=128, JL=1, JU=128, KL=1, KU=128,
     $ F7=78125., T30=1073741824.)
      COMMON /ARRAYS/ A(NJA,NJB), B(NJA,NJB), C(NJA,NJB), D(NJA,NJB),
     $ E(NJA,NJB), F(NJA,NJB,3), X(NJA,NJB), Y(NJA,NJB), FX(NJA,NJB,3)
      DATA IT/400/, ANS/-0.354649411858726/
C
      LF = NJA * NJB * 3
      T = F7 / T30
      DO 100 J = KL, KU
        DO 100 I = JL, JU
          T = MOD (F7 * T, 1.0D0)
          A(I,J) = T
          T = MOD (F7 * T, 1.0D0)
          B(I,J) = T
          T = MOD (F7 * T, 1.0D0)
          C(I,J) = T
          T = MOD (F7 * T, 1.0D0)
          D(I,J) = T
          T = MOD (F7 * T, 1.0D0)
          E(I,J) = T
          DO 100 K = 1, 3
            T = MOD (F7 * T, 1.0D0)
            FX(I,J,K) = T
100   CONTINUE
      TM = CPTIME ()
C
C   TIMING TEST
C
      DO 110 I = 1, IT
        CALL COPY (LF, FX, F)
        CALL VPENTA
110   CONTINUE
C
      TM = CPTIME ()
      ER = ABS ((F(19,19,1) - ANS) / ANS)
      FP = IT * KU * (40. * KU - 53.)
C
      RETURN
      END
