kusano 2b45e8
      PROGRAM DBLAT1
kusano 2b45e8
*     Test program for the DOUBLE PRECISION Level 1 BLAS.
kusano 2b45e8
*     Based upon the original BLAS test routine together with:
kusano 2b45e8
*     F06EAF Example Program Text
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER          NOUT
kusano 2b45e8
      PARAMETER        (NOUT=6)
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER          ICASE, INCX, INCY, MODE, N
kusano 2b45e8
      LOGICAL          PASS
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      DOUBLE PRECISION SFAC
kusano 2b45e8
      INTEGER          IC
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL         CHECK0, CHECK1, CHECK2, CHECK3, HEADER
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA             SFAC/9.765625D-4/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      WRITE (NOUT,99999)
kusano 2b45e8
      DO 20 IC = 1, 10
kusano 2b45e8
         ICASE = IC
kusano 2b45e8
         CALL HEADER
kusano 2b45e8
*
kusano 2b45e8
*        .. Initialize  PASS,  INCX,  INCY, and MODE for a new case. ..
kusano 2b45e8
*        .. the value 9999 for INCX, INCY or MODE will appear in the ..
kusano 2b45e8
*        .. detailed  output, if any, for cases  that do not involve ..
kusano 2b45e8
*        .. these parameters ..
kusano 2b45e8
*
kusano 2b45e8
         PASS = .TRUE.
kusano 2b45e8
         INCX = 9999
kusano 2b45e8
         INCY = 9999
kusano 2b45e8
         MODE = 9999
kusano 2b45e8
         IF (ICASE.EQ.3) THEN
kusano 2b45e8
            CALL CHECK0(SFAC)
kusano 2b45e8
         ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.
kusano 2b45e8
     +            ICASE.EQ.10) THEN
kusano 2b45e8
            CALL CHECK1(SFAC)
kusano 2b45e8
         ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.
kusano 2b45e8
     +            ICASE.EQ.6) THEN
kusano 2b45e8
            CALL CHECK2(SFAC)
kusano 2b45e8
         ELSE IF (ICASE.EQ.4) THEN
kusano 2b45e8
            CALL CHECK3(SFAC)
kusano 2b45e8
         END IF
kusano 2b45e8
*        -- Print
kusano 2b45e8
         IF (PASS) WRITE (NOUT,99998)
kusano 2b45e8
   20 CONTINUE
kusano 2b45e8
      STOP
kusano 2b45e8
*
kusano 2b45e8
99999 FORMAT (' Real BLAS Test Program Results',/1X)
kusano 2b45e8
99998 FORMAT ('                                    ----- PASS -----')
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE HEADER
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER          NOUT
kusano 2b45e8
      PARAMETER        (NOUT=6)
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER          ICASE, INCX, INCY, MODE, N
kusano 2b45e8
      LOGICAL          PASS
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      CHARACTER*6      L(10)
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA             L(1)/' DDOT '/
kusano 2b45e8
      DATA             L(2)/'DAXPY '/
kusano 2b45e8
      DATA             L(3)/'DROTG '/
kusano 2b45e8
      DATA             L(4)/' DROT '/
kusano 2b45e8
      DATA             L(5)/'DCOPY '/
kusano 2b45e8
      DATA             L(6)/'DSWAP '/
kusano 2b45e8
      DATA             L(7)/'DNRM2 '/
kusano 2b45e8
      DATA             L(8)/'DASUM '/
kusano 2b45e8
      DATA             L(9)/'DSCAL '/
kusano 2b45e8
      DATA             L(10)/'IDAMAX'/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      WRITE (NOUT,99999) ICASE, L(ICASE)
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
99999 FORMAT (/' Test of subprogram number',I3,12X,A6)
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE CHECK0(SFAC)
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER           NOUT
kusano 2b45e8
      PARAMETER         (NOUT=6)
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION  SFAC
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER           ICASE, INCX, INCY, MODE, N
kusano 2b45e8
      LOGICAL           PASS
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      DOUBLE PRECISION  D12, SA, SB, SC, SS
kusano 2b45e8
      INTEGER           K
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      DOUBLE PRECISION  DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
kusano 2b45e8
     +                  DS1(8)
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL          DROTG, STEST1
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA              DA1/0.3D0, 0.4D0, -0.3D0, -0.4D0, -0.3D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 1.0D0/
kusano 2b45e8
      DATA              DB1/0.4D0, 0.3D0, 0.4D0, 0.3D0, -0.4D0, 0.0D0,
kusano 2b45e8
     +                  1.0D0, 0.0D0/
kusano 2b45e8
      DATA              DC1/0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.6D0, 1.0D0,
kusano 2b45e8
     +                  0.0D0, 1.0D0/
kusano 2b45e8
      DATA              DS1/0.8D0, 0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.0D0,
kusano 2b45e8
     +                  1.0D0, 0.0D0/
kusano 2b45e8
      DATA              DATRUE/0.5D0, 0.5D0, 0.5D0, -0.5D0, -0.5D0,
kusano 2b45e8
     +                  0.0D0, 1.0D0, 1.0D0/
kusano 2b45e8
      DATA              DBTRUE/0.0D0, 0.6D0, 0.0D0, -0.6D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 1.0D0, 0.0D0/
kusano 2b45e8
      DATA              D12/4096.0D0/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
*     Compute true values which cannot be prestored
kusano 2b45e8
*     in decimal notation
kusano 2b45e8
*
kusano 2b45e8
      DBTRUE(1) = 1.0D0/0.6D0
kusano 2b45e8
      DBTRUE(3) = -1.0D0/0.6D0
kusano 2b45e8
      DBTRUE(5) = 1.0D0/0.6D0
kusano 2b45e8
*
kusano 2b45e8
      DO 20 K = 1, 8
kusano 2b45e8
*        .. Set N=K for identification in output if any ..
kusano 2b45e8
         N = K
kusano 2b45e8
         IF (ICASE.EQ.3) THEN
kusano 2b45e8
*           .. DROTG ..
kusano 2b45e8
            IF (K.GT.8) GO TO 40
kusano 2b45e8
            SA = DA1(K)
kusano 2b45e8
            SB = DB1(K)
kusano 2b45e8
            CALL DROTG(SA,SB,SC,SS)
kusano 2b45e8
            CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC)
kusano 2b45e8
            CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)
kusano 2b45e8
            CALL STEST1(SC,DC1(K),DC1(K),SFAC)
kusano 2b45e8
            CALL STEST1(SS,DS1(K),DS1(K),SFAC)
kusano 2b45e8
         ELSE
kusano 2b45e8
            WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
kusano 2b45e8
            STOP
kusano 2b45e8
         END IF
kusano 2b45e8
   20 CONTINUE
kusano 2b45e8
   40 RETURN
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE CHECK1(SFAC)
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER           NOUT
kusano 2b45e8
      PARAMETER         (NOUT=6)
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION  SFAC
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER           ICASE, INCX, INCY, MODE, N
kusano 2b45e8
      LOGICAL           PASS
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      INTEGER           I, LEN, NP1
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      DOUBLE PRECISION  DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),
kusano 2b45e8
     +                  SA(10), STEMP(1), STRUE(8), SX(8)
kusano 2b45e8
      INTEGER           ITRUE2(5)
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      DOUBLE PRECISION  DASUM, DNRM2
kusano 2b45e8
      INTEGER           IDAMAX
kusano 2b45e8
      EXTERNAL          DASUM, DNRM2, IDAMAX
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL          ITEST1, DSCAL, STEST, STEST1
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC         MAX
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA              SA/0.3D0, -1.0D0, 0.0D0, 1.0D0, 0.3D0, 0.3D0,
kusano 2b45e8
     +                  0.3D0, 0.3D0, 0.3D0, 0.3D0/
kusano 2b45e8
      DATA              DV/0.1D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,
kusano 2b45e8
     +                  2.0D0, 2.0D0, 0.3D0, 3.0D0, 3.0D0, 3.0D0, 3.0D0,
kusano 2b45e8
     +                  3.0D0, 3.0D0, 3.0D0, 0.3D0, -0.4D0, 4.0D0,
kusano 2b45e8
     +                  4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 0.2D0,
kusano 2b45e8
     +                  -0.6D0, 0.3D0, 5.0D0, 5.0D0, 5.0D0, 5.0D0,
kusano 2b45e8
     +                  5.0D0, 0.1D0, -0.3D0, 0.5D0, -0.1D0, 6.0D0,
kusano 2b45e8
     +                  6.0D0, 6.0D0, 6.0D0, 0.1D0, 8.0D0, 8.0D0, 8.0D0,
kusano 2b45e8
     +                  8.0D0, 8.0D0, 8.0D0, 8.0D0, 0.3D0, 9.0D0, 9.0D0,
kusano 2b45e8
     +                  9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 0.3D0, 2.0D0,
kusano 2b45e8
     +                  -0.4D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,
kusano 2b45e8
     +                  0.2D0, 3.0D0, -0.6D0, 5.0D0, 0.3D0, 2.0D0,
kusano 2b45e8
     +                  2.0D0, 2.0D0, 0.1D0, 4.0D0, -0.3D0, 6.0D0,
kusano 2b45e8
     +                  -0.5D0, 7.0D0, -0.1D0, 3.0D0/
kusano 2b45e8
      DATA              DTRUE1/0.0D0, 0.3D0, 0.5D0, 0.7D0, 0.6D0/
kusano 2b45e8
      DATA              DTRUE3/0.0D0, 0.3D0, 0.7D0, 1.1D0, 1.0D0/
kusano 2b45e8
      DATA              DTRUE5/0.10D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,
kusano 2b45e8
     +                  2.0D0, 2.0D0, 2.0D0, -0.3D0, 3.0D0, 3.0D0,
kusano 2b45e8
     +                  3.0D0, 3.0D0, 3.0D0, 3.0D0, 3.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0,
kusano 2b45e8
     +                  0.20D0, -0.60D0, 0.30D0, 5.0D0, 5.0D0, 5.0D0,
kusano 2b45e8
     +                  5.0D0, 5.0D0, 0.03D0, -0.09D0, 0.15D0, -0.03D0,
kusano 2b45e8
     +                  6.0D0, 6.0D0, 6.0D0, 6.0D0, 0.10D0, 8.0D0,
kusano 2b45e8
     +                  8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0,
kusano 2b45e8
     +                  0.09D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0,
kusano 2b45e8
     +                  9.0D0, 9.0D0, 0.09D0, 2.0D0, -0.12D0, 2.0D0,
kusano 2b45e8
     +                  2.0D0, 2.0D0, 2.0D0, 2.0D0, 0.06D0, 3.0D0,
kusano 2b45e8
     +                  -0.18D0, 5.0D0, 0.09D0, 2.0D0, 2.0D0, 2.0D0,
kusano 2b45e8
     +                  0.03D0, 4.0D0, -0.09D0, 6.0D0, -0.15D0, 7.0D0,
kusano 2b45e8
     +                  -0.03D0, 3.0D0/
kusano 2b45e8
      DATA              ITRUE2/0, 1, 2, 2, 3/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      DO 80 INCX = 1, 2
kusano 2b45e8
         DO 60 NP1 = 1, 5
kusano 2b45e8
            N = NP1 - 1
kusano 2b45e8
            LEN = 2*MAX(N,1)
kusano 2b45e8
*           .. Set vector arguments ..
kusano 2b45e8
            DO 20 I = 1, LEN
kusano 2b45e8
               SX(I) = DV(I,NP1,INCX)
kusano 2b45e8
   20       CONTINUE
kusano 2b45e8
*
kusano 2b45e8
            IF (ICASE.EQ.7) THEN
kusano 2b45e8
*              .. DNRM2 ..
kusano 2b45e8
               STEMP(1) = DTRUE1(NP1)
kusano 2b45e8
               CALL STEST1(DNRM2(N,SX,INCX),STEMP,STEMP,SFAC)
kusano 2b45e8
            ELSE IF (ICASE.EQ.8) THEN
kusano 2b45e8
*              .. DASUM ..
kusano 2b45e8
               STEMP(1) = DTRUE3(NP1)
kusano 2b45e8
               CALL STEST1(DASUM(N,SX,INCX),STEMP,STEMP,SFAC)
kusano 2b45e8
            ELSE IF (ICASE.EQ.9) THEN
kusano 2b45e8
*              .. DSCAL ..
kusano 2b45e8
               CALL DSCAL(N,SA((INCX-1)*5+NP1),SX,INCX)
kusano 2b45e8
               DO 40 I = 1, LEN
kusano 2b45e8
                  STRUE(I) = DTRUE5(I,NP1,INCX)
kusano 2b45e8
   40          CONTINUE
kusano 2b45e8
               CALL STEST(LEN,SX,STRUE,STRUE,SFAC)
kusano 2b45e8
            ELSE IF (ICASE.EQ.10) THEN
kusano 2b45e8
*              .. IDAMAX ..
kusano 2b45e8
               CALL ITEST1(IDAMAX(N,SX,INCX),ITRUE2(NP1))
kusano 2b45e8
            ELSE
kusano 2b45e8
               WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
kusano 2b45e8
               STOP
kusano 2b45e8
            END IF
kusano 2b45e8
   60    CONTINUE
kusano 2b45e8
   80 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE CHECK2(SFAC)
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER           NOUT
kusano 2b45e8
      PARAMETER         (NOUT=6)
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION  SFAC
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER           ICASE, INCX, INCY, MODE, N
kusano 2b45e8
      LOGICAL           PASS
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      DOUBLE PRECISION  SA, SC, SS
kusano 2b45e8
      INTEGER           I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      DOUBLE PRECISION  DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),
kusano 2b45e8
     +                  DT8(7,4,4), DT9X(7,4,4), DT9Y(7,4,4), DX1(7),
kusano 2b45e8
     +                  DY1(7), SSIZE1(4), SSIZE2(14,2), STX(7), STY(7),
kusano 2b45e8
     +                  SX(7), SY(7)
kusano 2b45e8
      INTEGER           INCXS(4), INCYS(4), LENS(4,2), NS(4)
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      DOUBLE PRECISION  DDOT
kusano 2b45e8
      EXTERNAL          DDOT
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL          DAXPY, DCOPY, DSWAP, STEST, STEST1
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC         ABS, MIN
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA              SA/0.3D0/
kusano 2b45e8
      DATA              INCXS/1, 2, -2, -1/
kusano 2b45e8
      DATA              INCYS/1, -2, 1, -2/
kusano 2b45e8
      DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/
kusano 2b45e8
      DATA              NS/0, 1, 2, 4/
kusano 2b45e8
      DATA              DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0,
kusano 2b45e8
     +                  -0.4D0/
kusano 2b45e8
      DATA              DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0,
kusano 2b45e8
     +                  0.8D0/
kusano 2b45e8
      DATA              SC, SS/0.8D0, 0.6D0/
kusano 2b45e8
      DATA              DT7/0.0D0, 0.30D0, 0.21D0, 0.62D0, 0.0D0,
kusano 2b45e8
     +                  0.30D0, -0.07D0, 0.85D0, 0.0D0, 0.30D0, -0.79D0,
kusano 2b45e8
     +                  -0.74D0, 0.0D0, 0.30D0, 0.33D0, 1.27D0/
kusano 2b45e8
      DATA              DT8/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.68D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.68D0, -0.87D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.68D0, -0.87D0, 0.15D0,
kusano 2b45e8
     +                  0.94D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.68D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.35D0, -0.9D0, 0.48D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.38D0, -0.9D0, 0.57D0, 0.7D0, -0.75D0,
kusano 2b45e8
     +                  0.2D0, 0.98D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.68D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.35D0, -0.72D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.38D0,
kusano 2b45e8
     +                  -0.63D0, 0.15D0, 0.88D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.68D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.68D0, -0.9D0, 0.33D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.68D0, -0.9D0, 0.33D0, 0.7D0,
kusano 2b45e8
     +                  -0.75D0, 0.2D0, 1.04D0/
kusano 2b45e8
      DATA              DT9X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.78D0, -0.46D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.78D0, -0.46D0, -0.22D0,
kusano 2b45e8
     +                  1.06D0, 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.78D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.66D0, 0.1D0, -0.1D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.96D0, 0.1D0, -0.76D0, 0.8D0, 0.90D0,
kusano 2b45e8
     +                  -0.3D0, -0.02D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.78D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.06D0, 0.1D0,
kusano 2b45e8
     +                  -0.1D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.90D0,
kusano 2b45e8
     +                  0.1D0, -0.22D0, 0.8D0, 0.18D0, -0.3D0, -0.02D0,
kusano 2b45e8
     +                  0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.78D0, 0.26D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.78D0, 0.26D0, -0.76D0, 1.12D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0/
kusano 2b45e8
      DATA              DT9Y/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.04D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.04D0, -0.78D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.04D0, -0.78D0, 0.54D0,
kusano 2b45e8
     +                  0.08D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.04D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.7D0,
kusano 2b45e8
     +                  -0.9D0, -0.12D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.64D0, -0.9D0, -0.30D0, 0.7D0, -0.18D0, 0.2D0,
kusano 2b45e8
     +                  0.28D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.04D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.7D0, -1.08D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.64D0, -1.26D0,
kusano 2b45e8
     +                  0.54D0, 0.20D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.04D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.04D0, -0.9D0, 0.18D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.04D0, -0.9D0, 0.18D0, 0.7D0,
kusano 2b45e8
     +                  -0.18D0, 0.2D0, 0.16D0/
kusano 2b45e8
      DATA              DT10X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.5D0, -0.9D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.5D0, -0.9D0, 0.3D0, 0.7D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.3D0, 0.1D0, 0.5D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.8D0, 0.1D0, -0.6D0,
kusano 2b45e8
     +                  0.8D0, 0.3D0, -0.3D0, 0.5D0, 0.6D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.9D0,
kusano 2b45e8
     +                  0.1D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.7D0,
kusano 2b45e8
     +                  0.1D0, 0.3D0, 0.8D0, -0.9D0, -0.3D0, 0.5D0,
kusano 2b45e8
     +                  0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.5D0, 0.3D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.5D0, 0.3D0, -0.6D0, 0.8D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0/
kusano 2b45e8
      DATA              DT10Y/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.6D0, 0.1D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, -0.5D0, -0.9D0, 0.6D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, -0.4D0, -0.9D0, 0.9D0,
kusano 2b45e8
     +                  0.7D0, -0.5D0, 0.2D0, 0.6D0, 0.5D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.5D0,
kusano 2b45e8
     +                  0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  -0.4D0, 0.9D0, -0.5D0, 0.6D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.7D0,
kusano 2b45e8
     +                  -0.5D0, 0.2D0, 0.8D0/
kusano 2b45e8
      DATA              SSIZE1/0.0D0, 0.3D0, 1.6D0, 3.2D0/
kusano 2b45e8
      DATA              SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
kusano 2b45e8
     +                  1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
kusano 2b45e8
     +                  1.17D0, 1.17D0, 1.17D0/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
      DO 120 KI = 1, 4
kusano 2b45e8
         INCX = INCXS(KI)
kusano 2b45e8
         INCY = INCYS(KI)
kusano 2b45e8
         MX = ABS(INCX)
kusano 2b45e8
         MY = ABS(INCY)
kusano 2b45e8
*
kusano 2b45e8
         DO 100 KN = 1, 4
kusano 2b45e8
            N = NS(KN)
kusano 2b45e8
            KSIZE = MIN(2,KN)
kusano 2b45e8
            LENX = LENS(KN,MX)
kusano 2b45e8
            LENY = LENS(KN,MY)
kusano 2b45e8
*           .. Initialize all argument arrays ..
kusano 2b45e8
            DO 20 I = 1, 7
kusano 2b45e8
               SX(I) = DX1(I)
kusano 2b45e8
               SY(I) = DY1(I)
kusano 2b45e8
   20       CONTINUE
kusano 2b45e8
*
kusano 2b45e8
            IF (ICASE.EQ.1) THEN
kusano 2b45e8
*              .. DDOT ..
kusano 2b45e8
               CALL STEST1(DDOT(N,SX,INCX,SY,INCY),DT7(KN,KI),SSIZE1(KN)
kusano 2b45e8
     +                     ,SFAC)
kusano 2b45e8
            ELSE IF (ICASE.EQ.2) THEN
kusano 2b45e8
*              .. DAXPY ..
kusano 2b45e8
               CALL DAXPY(N,SA,SX,INCX,SY,INCY)
kusano 2b45e8
               DO 40 J = 1, LENY
kusano 2b45e8
                  STY(J) = DT8(J,KN,KI)
kusano 2b45e8
   40          CONTINUE
kusano 2b45e8
               CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
kusano 2b45e8
            ELSE IF (ICASE.EQ.5) THEN
kusano 2b45e8
*              .. DCOPY ..
kusano 2b45e8
               DO 60 I = 1, 7
kusano 2b45e8
                  STY(I) = DT10Y(I,KN,KI)
kusano 2b45e8
   60          CONTINUE
kusano 2b45e8
               CALL DCOPY(N,SX,INCX,SY,INCY)
kusano 2b45e8
               CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
kusano 2b45e8
            ELSE IF (ICASE.EQ.6) THEN
kusano 2b45e8
*              .. DSWAP ..
kusano 2b45e8
               CALL DSWAP(N,SX,INCX,SY,INCY)
kusano 2b45e8
               DO 80 I = 1, 7
kusano 2b45e8
                  STX(I) = DT10X(I,KN,KI)
kusano 2b45e8
                  STY(I) = DT10Y(I,KN,KI)
kusano 2b45e8
   80          CONTINUE
kusano 2b45e8
               CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0D0)
kusano 2b45e8
               CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
kusano 2b45e8
            ELSE
kusano 2b45e8
               WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
kusano 2b45e8
               STOP
kusano 2b45e8
            END IF
kusano 2b45e8
  100    CONTINUE
kusano 2b45e8
  120 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE CHECK3(SFAC)
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER           NOUT
kusano 2b45e8
      PARAMETER         (NOUT=6)
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION  SFAC
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER           ICASE, INCX, INCY, MODE, N
kusano 2b45e8
      LOGICAL           PASS
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      DOUBLE PRECISION  SA, SC, SS
kusano 2b45e8
      INTEGER           I, K, KI, KN, KSIZE, LENX, LENY, MX, MY
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      DOUBLE PRECISION  COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4),
kusano 2b45e8
     +                  DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5),
kusano 2b45e8
     +                  MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5),
kusano 2b45e8
     +                  MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7),
kusano 2b45e8
     +                  SY(7)
kusano 2b45e8
      INTEGER           INCXS(4), INCYS(4), LENS(4,2), MWPINX(11),
kusano 2b45e8
     +                  MWPINY(11), MWPN(11), NS(4)
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL          DROT, STEST
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC         ABS, MIN
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
kusano 2b45e8
*     .. Data statements ..
kusano 2b45e8
      DATA              SA/0.3D0/
kusano 2b45e8
      DATA              INCXS/1, 2, -2, -1/
kusano 2b45e8
      DATA              INCYS/1, -2, 1, -2/
kusano 2b45e8
      DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/
kusano 2b45e8
      DATA              NS/0, 1, 2, 4/
kusano 2b45e8
      DATA              DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0,
kusano 2b45e8
     +                  -0.4D0/
kusano 2b45e8
      DATA              DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0,
kusano 2b45e8
     +                  0.8D0/
kusano 2b45e8
      DATA              SC, SS/0.8D0, 0.6D0/
kusano 2b45e8
      DATA              DT9X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.78D0, -0.46D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.78D0, -0.46D0, -0.22D0,
kusano 2b45e8
     +                  1.06D0, 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.78D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.66D0, 0.1D0, -0.1D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.96D0, 0.1D0, -0.76D0, 0.8D0, 0.90D0,
kusano 2b45e8
     +                  -0.3D0, -0.02D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.78D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.06D0, 0.1D0,
kusano 2b45e8
     +                  -0.1D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.90D0,
kusano 2b45e8
     +                  0.1D0, -0.22D0, 0.8D0, 0.18D0, -0.3D0, -0.02D0,
kusano 2b45e8
     +                  0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.78D0, 0.26D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.78D0, 0.26D0, -0.76D0, 1.12D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0/
kusano 2b45e8
      DATA              DT9Y/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.04D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.04D0, -0.78D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.04D0, -0.78D0, 0.54D0,
kusano 2b45e8
     +                  0.08D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.04D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.7D0,
kusano 2b45e8
     +                  -0.9D0, -0.12D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.64D0, -0.9D0, -0.30D0, 0.7D0, -0.18D0, 0.2D0,
kusano 2b45e8
     +                  0.28D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.04D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.7D0, -1.08D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.64D0, -1.26D0,
kusano 2b45e8
     +                  0.54D0, 0.20D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.04D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.04D0, -0.9D0, 0.18D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.04D0, -0.9D0, 0.18D0, 0.7D0,
kusano 2b45e8
     +                  -0.18D0, 0.2D0, 0.16D0/
kusano 2b45e8
      DATA              SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,
kusano 2b45e8
     +                  0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
kusano 2b45e8
     +                  1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
kusano 2b45e8
     +                  1.17D0, 1.17D0, 1.17D0/
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
      DO 60 KI = 1, 4
kusano 2b45e8
         INCX = INCXS(KI)
kusano 2b45e8
         INCY = INCYS(KI)
kusano 2b45e8
         MX = ABS(INCX)
kusano 2b45e8
         MY = ABS(INCY)
kusano 2b45e8
*
kusano 2b45e8
         DO 40 KN = 1, 4
kusano 2b45e8
            N = NS(KN)
kusano 2b45e8
            KSIZE = MIN(2,KN)
kusano 2b45e8
            LENX = LENS(KN,MX)
kusano 2b45e8
            LENY = LENS(KN,MY)
kusano 2b45e8
*
kusano 2b45e8
            IF (ICASE.EQ.4) THEN
kusano 2b45e8
*              .. DROT ..
kusano 2b45e8
               DO 20 I = 1, 7
kusano 2b45e8
                  SX(I) = DX1(I)
kusano 2b45e8
                  SY(I) = DY1(I)
kusano 2b45e8
                  STX(I) = DT9X(I,KN,KI)
kusano 2b45e8
                  STY(I) = DT9Y(I,KN,KI)
kusano 2b45e8
   20          CONTINUE
kusano 2b45e8
               CALL DROT(N,SX,INCX,SY,INCY,SC,SS)
kusano 2b45e8
               CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC)
kusano 2b45e8
               CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
kusano 2b45e8
            ELSE
kusano 2b45e8
               WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
kusano 2b45e8
               STOP
kusano 2b45e8
            END IF
kusano 2b45e8
   40    CONTINUE
kusano 2b45e8
   60 CONTINUE
kusano 2b45e8
*
kusano 2b45e8
      MWPC(1) = 1
kusano 2b45e8
      DO 80 I = 2, 11
kusano 2b45e8
         MWPC(I) = 0
kusano 2b45e8
   80 CONTINUE
kusano 2b45e8
      MWPS(1) = 0
kusano 2b45e8
      DO 100 I = 2, 6
kusano 2b45e8
         MWPS(I) = 1
kusano 2b45e8
  100 CONTINUE
kusano 2b45e8
      DO 120 I = 7, 11
kusano 2b45e8
         MWPS(I) = -1
kusano 2b45e8
  120 CONTINUE
kusano 2b45e8
      MWPINX(1) = 1
kusano 2b45e8
      MWPINX(2) = 1
kusano 2b45e8
      MWPINX(3) = 1
kusano 2b45e8
      MWPINX(4) = -1
kusano 2b45e8
      MWPINX(5) = 1
kusano 2b45e8
      MWPINX(6) = -1
kusano 2b45e8
      MWPINX(7) = 1
kusano 2b45e8
      MWPINX(8) = 1
kusano 2b45e8
      MWPINX(9) = -1
kusano 2b45e8
      MWPINX(10) = 1
kusano 2b45e8
      MWPINX(11) = -1
kusano 2b45e8
      MWPINY(1) = 1
kusano 2b45e8
      MWPINY(2) = 1
kusano 2b45e8
      MWPINY(3) = -1
kusano 2b45e8
      MWPINY(4) = -1
kusano 2b45e8
      MWPINY(5) = 2
kusano 2b45e8
      MWPINY(6) = 1
kusano 2b45e8
      MWPINY(7) = 1
kusano 2b45e8
      MWPINY(8) = -1
kusano 2b45e8
      MWPINY(9) = -1
kusano 2b45e8
      MWPINY(10) = 2
kusano 2b45e8
      MWPINY(11) = 1
kusano 2b45e8
      DO 140 I = 1, 11
kusano 2b45e8
         MWPN(I) = 5
kusano 2b45e8
  140 CONTINUE
kusano 2b45e8
      MWPN(5) = 3
kusano 2b45e8
      MWPN(10) = 3
kusano 2b45e8
      DO 160 I = 1, 5
kusano 2b45e8
         MWPX(I) = I
kusano 2b45e8
         MWPY(I) = I
kusano 2b45e8
         MWPTX(1,I) = I
kusano 2b45e8
         MWPTY(1,I) = I
kusano 2b45e8
         MWPTX(2,I) = I
kusano 2b45e8
         MWPTY(2,I) = -I
kusano 2b45e8
         MWPTX(3,I) = 6 - I
kusano 2b45e8
         MWPTY(3,I) = I - 6
kusano 2b45e8
         MWPTX(4,I) = I
kusano 2b45e8
         MWPTY(4,I) = -I
kusano 2b45e8
         MWPTX(6,I) = 6 - I
kusano 2b45e8
         MWPTY(6,I) = I - 6
kusano 2b45e8
         MWPTX(7,I) = -I
kusano 2b45e8
         MWPTY(7,I) = I
kusano 2b45e8
         MWPTX(8,I) = I - 6
kusano 2b45e8
         MWPTY(8,I) = 6 - I
kusano 2b45e8
         MWPTX(9,I) = -I
kusano 2b45e8
         MWPTY(9,I) = I
kusano 2b45e8
         MWPTX(11,I) = I - 6
kusano 2b45e8
         MWPTY(11,I) = 6 - I
kusano 2b45e8
  160 CONTINUE
kusano 2b45e8
      MWPTX(5,1) = 1
kusano 2b45e8
      MWPTX(5,2) = 3
kusano 2b45e8
      MWPTX(5,3) = 5
kusano 2b45e8
      MWPTX(5,4) = 4
kusano 2b45e8
      MWPTX(5,5) = 5
kusano 2b45e8
      MWPTY(5,1) = -1
kusano 2b45e8
      MWPTY(5,2) = 2
kusano 2b45e8
      MWPTY(5,3) = -2
kusano 2b45e8
      MWPTY(5,4) = 4
kusano 2b45e8
      MWPTY(5,5) = -3
kusano 2b45e8
      MWPTX(10,1) = -1
kusano 2b45e8
      MWPTX(10,2) = -3
kusano 2b45e8
      MWPTX(10,3) = -5
kusano 2b45e8
      MWPTX(10,4) = 4
kusano 2b45e8
      MWPTX(10,5) = 5
kusano 2b45e8
      MWPTY(10,1) = 1
kusano 2b45e8
      MWPTY(10,2) = 2
kusano 2b45e8
      MWPTY(10,3) = 2
kusano 2b45e8
      MWPTY(10,4) = 4
kusano 2b45e8
      MWPTY(10,5) = 3
kusano 2b45e8
      DO 200 I = 1, 11
kusano 2b45e8
         INCX = MWPINX(I)
kusano 2b45e8
         INCY = MWPINY(I)
kusano 2b45e8
         DO 180 K = 1, 5
kusano 2b45e8
            COPYX(K) = MWPX(K)
kusano 2b45e8
            COPYY(K) = MWPY(K)
kusano 2b45e8
            MWPSTX(K) = MWPTX(I,K)
kusano 2b45e8
            MWPSTY(K) = MWPTY(I,K)
kusano 2b45e8
  180    CONTINUE
kusano 2b45e8
         CALL DROT(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I))
kusano 2b45e8
         CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC)
kusano 2b45e8
         CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC)
kusano 2b45e8
  200 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)
kusano 2b45e8
*     ********************************* STEST **************************
kusano 2b45e8
*
kusano 2b45e8
*     THIS SUBR COMPARES ARRAYS  SCOMP() AND STRUE() OF LENGTH LEN TO
kusano 2b45e8
*     SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
kusano 2b45e8
*     NEGLIGIBLE.
kusano 2b45e8
*
kusano 2b45e8
*     C. L. LAWSON, JPL, 1974 DEC 10
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER          NOUT
kusano 2b45e8
      PARAMETER        (NOUT=6)
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION SFAC
kusano 2b45e8
      INTEGER          LEN
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER          ICASE, INCX, INCY, MODE, N
kusano 2b45e8
      LOGICAL          PASS
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      DOUBLE PRECISION SD
kusano 2b45e8
      INTEGER          I
kusano 2b45e8
*     .. External Functions ..
kusano 2b45e8
      DOUBLE PRECISION SDIFF
kusano 2b45e8
      EXTERNAL         SDIFF
kusano 2b45e8
*     .. Intrinsic Functions ..
kusano 2b45e8
      INTRINSIC        ABS
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
      DO 40 I = 1, LEN
kusano 2b45e8
         SD = SCOMP(I) - STRUE(I)
kusano 2b45e8
         IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0D0)
kusano 2b45e8
     +       GO TO 40
kusano 2b45e8
*
kusano 2b45e8
*                             HERE    SCOMP(I) IS NOT CLOSE TO STRUE(I).
kusano 2b45e8
*
kusano 2b45e8
         IF ( .NOT. PASS) GO TO 20
kusano 2b45e8
*                             PRINT FAIL MESSAGE AND HEADER.
kusano 2b45e8
         PASS = .FALSE.
kusano 2b45e8
         WRITE (NOUT,99999)
kusano 2b45e8
         WRITE (NOUT,99998)
kusano 2b45e8
   20    WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),
kusano 2b45e8
     +     STRUE(I), SD, SSIZE(I)
kusano 2b45e8
   40 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
99999 FORMAT ('                                       FAIL')
kusano 2b45e8
99998 FORMAT (/' CASE  N INCX INCY MODE  I                            ',
kusano 2b45e8
     +       ' COMP(I)                             TRUE(I)  DIFFERENCE',
kusano 2b45e8
     +       '     SIZE(I)',/1X)
kusano 2b45e8
99997 FORMAT (1X,I4,I3,3I5,I3,2D36.8,2D12.4)
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
kusano 2b45e8
*     ************************* STEST1 *****************************
kusano 2b45e8
*
kusano 2b45e8
*     THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN
kusano 2b45e8
*     REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE
kusano 2b45e8
*     ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.
kusano 2b45e8
*
kusano 2b45e8
*     C.L. LAWSON, JPL, 1978 DEC 6
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION  SCOMP1, SFAC, STRUE1
kusano 2b45e8
*     .. Array Arguments ..
kusano 2b45e8
      DOUBLE PRECISION  SSIZE(*)
kusano 2b45e8
*     .. Local Arrays ..
kusano 2b45e8
      DOUBLE PRECISION  SCOMP(1), STRUE(1)
kusano 2b45e8
*     .. External Subroutines ..
kusano 2b45e8
      EXTERNAL          STEST
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
      SCOMP(1) = SCOMP1
kusano 2b45e8
      STRUE(1) = STRUE1
kusano 2b45e8
      CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)
kusano 2b45e8
*
kusano 2b45e8
      RETURN
kusano 2b45e8
      END
kusano 2b45e8
      DOUBLE PRECISION FUNCTION SDIFF(SA,SB)
kusano 2b45e8
*     ********************************* SDIFF **************************
kusano 2b45e8
*     COMPUTES DIFFERENCE OF TWO NUMBERS.  C. L. LAWSON, JPL 1974 FEB 15
kusano 2b45e8
*
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      DOUBLE PRECISION                SA, SB
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
      SDIFF = SA - SB
kusano 2b45e8
      RETURN
kusano 2b45e8
      END
kusano 2b45e8
      SUBROUTINE ITEST1(ICOMP,ITRUE)
kusano 2b45e8
*     ********************************* ITEST1 *************************
kusano 2b45e8
*
kusano 2b45e8
*     THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR
kusano 2b45e8
*     EQUALITY.
kusano 2b45e8
*     C. L. LAWSON, JPL, 1974 DEC 10
kusano 2b45e8
*
kusano 2b45e8
*     .. Parameters ..
kusano 2b45e8
      INTEGER           NOUT
kusano 2b45e8
      PARAMETER         (NOUT=6)
kusano 2b45e8
*     .. Scalar Arguments ..
kusano 2b45e8
      INTEGER           ICOMP, ITRUE
kusano 2b45e8
*     .. Scalars in Common ..
kusano 2b45e8
      INTEGER           ICASE, INCX, INCY, MODE, N
kusano 2b45e8
      LOGICAL           PASS
kusano 2b45e8
*     .. Local Scalars ..
kusano 2b45e8
      INTEGER           ID
kusano 2b45e8
*     .. Common blocks ..
kusano 2b45e8
      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
kusano 2b45e8
*     .. Executable Statements ..
kusano 2b45e8
*
kusano 2b45e8
      IF (ICOMP.EQ.ITRUE) GO TO 40
kusano 2b45e8
*
kusano 2b45e8
*                            HERE ICOMP IS NOT EQUAL TO ITRUE.
kusano 2b45e8
*
kusano 2b45e8
      IF ( .NOT. PASS) GO TO 20
kusano 2b45e8
*                             PRINT FAIL MESSAGE AND HEADER.
kusano 2b45e8
      PASS = .FALSE.
kusano 2b45e8
      WRITE (NOUT,99999)
kusano 2b45e8
      WRITE (NOUT,99998)
kusano 2b45e8
   20 ID = ICOMP - ITRUE
kusano 2b45e8
      WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID
kusano 2b45e8
   40 CONTINUE
kusano 2b45e8
      RETURN
kusano 2b45e8
*
kusano 2b45e8
99999 FORMAT ('                                       FAIL')
kusano 2b45e8
99998 FORMAT (/' CASE  N INCX INCY MODE                               ',
kusano 2b45e8
     +       ' COMP                                TRUE     DIFFERENCE',
kusano 2b45e8
     +       /1X)
kusano 2b45e8
99997 FORMAT (1X,I4,I3,3I5,2I36,I12)
kusano 2b45e8
      END