LAPACK 3.3.1
Linear Algebra PACKage

sblat1.f

Go to the documentation of this file.
00001       PROGRAM SBLAT1
00002 *     Test program for the REAL             Level 1 BLAS.
00003 *     Based upon the original BLAS test routine together with:
00004 *     F06EAF Example Program Text
00005 *     .. Parameters ..
00006       INTEGER          NOUT
00007       PARAMETER        (NOUT=6)
00008 *     .. Scalars in Common ..
00009       INTEGER          ICASE, INCX, INCY, N
00010       LOGICAL          PASS
00011 *     .. Local Scalars ..
00012       REAL             SFAC
00013       INTEGER          IC
00014 *     .. External Subroutines ..
00015       EXTERNAL         CHECK0, CHECK1, CHECK2, CHECK3, HEADER
00016 *     .. Common blocks ..
00017       COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS
00018 *     .. Data statements ..
00019       DATA             SFAC/9.765625E-4/
00020 *     .. Executable Statements ..
00021       WRITE (NOUT,99999)
00022       DO 20 IC = 1, 13
00023          ICASE = IC
00024          CALL HEADER
00025 *
00026 *        .. Initialize  PASS,  INCX,  and INCY for a new case. ..
00027 *        .. the value 9999 for INCX or INCY will appear in the ..
00028 *        .. detailed  output, if any, for cases  that do not involve ..
00029 *        .. these parameters ..
00030 *
00031          PASS = .TRUE.
00032          INCX = 9999
00033          INCY = 9999
00034          IF (ICASE.EQ.3 .OR. ICASE.EQ.11) THEN
00035             CALL CHECK0(SFAC)
00036          ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.
00037      +            ICASE.EQ.10) THEN
00038             CALL CHECK1(SFAC)
00039          ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.
00040      +            ICASE.EQ.6 .OR. ICASE.EQ.12 .OR. ICASE.EQ.13) THEN
00041             CALL CHECK2(SFAC)
00042          ELSE IF (ICASE.EQ.4) THEN
00043             CALL CHECK3(SFAC)
00044          END IF
00045 *        -- Print
00046          IF (PASS) WRITE (NOUT,99998)
00047    20 CONTINUE
00048       STOP
00049 *
00050 99999 FORMAT (' Real BLAS Test Program Results',/1X)
00051 99998 FORMAT ('                                    ----- PASS -----')
00052       END
00053       SUBROUTINE HEADER
00054 *     .. Parameters ..
00055       INTEGER          NOUT
00056       PARAMETER        (NOUT=6)
00057 *     .. Scalars in Common ..
00058       INTEGER          ICASE, INCX, INCY, N
00059       LOGICAL          PASS
00060 *     .. Local Arrays ..
00061       CHARACTER*6      L(13)
00062 *     .. Common blocks ..
00063       COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS
00064 *     .. Data statements ..
00065       DATA             L(1)/' SDOT '/
00066       DATA             L(2)/'SAXPY '/
00067       DATA             L(3)/'SROTG '/
00068       DATA             L(4)/' SROT '/
00069       DATA             L(5)/'SCOPY '/
00070       DATA             L(6)/'SSWAP '/
00071       DATA             L(7)/'SNRM2 '/
00072       DATA             L(8)/'SASUM '/
00073       DATA             L(9)/'SSCAL '/
00074       DATA             L(10)/'ISAMAX'/
00075       DATA             L(11)/'SROTMG'/
00076       DATA             L(12)/'SROTM '/
00077       DATA             L(13)/'SDSDOT'/
00078 *     .. Executable Statements ..
00079       WRITE (NOUT,99999) ICASE, L(ICASE)
00080       RETURN
00081 *
00082 99999 FORMAT (/' Test of subprogram number',I3,12X,A6)
00083       END
00084       SUBROUTINE CHECK0(SFAC)
00085 *     .. Parameters ..
00086       INTEGER           NOUT
00087       PARAMETER         (NOUT=6)
00088 *     .. Scalar Arguments ..
00089       REAL              SFAC
00090 *     .. Scalars in Common ..
00091       INTEGER           ICASE, INCX, INCY, N
00092       LOGICAL           PASS
00093 *     .. Local Scalars ..
00094       REAL              D12, SA, SB, SC, SS
00095       INTEGER           I, K
00096 *     .. Local Arrays ..
00097       REAL              DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
00098      +                  DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)
00099 *     .. External Subroutines ..
00100       EXTERNAL          SROTG, SROTMG, STEST1
00101 *     .. Common blocks ..
00102       COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS
00103 *     .. Data statements ..
00104       DATA              DA1/0.3E0, 0.4E0, -0.3E0, -0.4E0, -0.3E0, 0.0E0,
00105      +                  0.0E0, 1.0E0/
00106       DATA              DB1/0.4E0, 0.3E0, 0.4E0, 0.3E0, -0.4E0, 0.0E0,
00107      +                  1.0E0, 0.0E0/
00108       DATA              DC1/0.6E0, 0.8E0, -0.6E0, 0.8E0, 0.6E0, 1.0E0,
00109      +                  0.0E0, 1.0E0/
00110       DATA              DS1/0.8E0, 0.6E0, 0.8E0, -0.6E0, 0.8E0, 0.0E0,
00111      +                  1.0E0, 0.0E0/
00112       DATA              DATRUE/0.5E0, 0.5E0, 0.5E0, -0.5E0, -0.5E0,
00113      +                  0.0E0, 1.0E0, 1.0E0/
00114       DATA              DBTRUE/0.0E0, 0.6E0, 0.0E0, -0.6E0, 0.0E0,
00115      +                  0.0E0, 1.0E0, 0.0E0/
00116 *     INPUT FOR MODIFIED GIVENS
00117       DATA DAB/ .1E0,.3E0,1.2E0,.2E0,
00118      A          .7E0, .2E0, .6E0, 4.2E0,
00119      B          0.E0,0.E0,0.E0,0.E0,
00120      C          4.E0, -1.E0, 2.E0, 4.E0,
00121      D          6.E-10, 2.E-2, 1.E5, 10.E0,
00122      E          4.E10, 2.E-2, 1.E-5, 10.E0,
00123      F          2.E-10, 4.E-2, 1.E5, 10.E0,
00124      G          2.E10, 4.E-2, 1.E-5, 10.E0,
00125      H          4.E0, -2.E0, 8.E0, 4.E0    /
00126 *    TRUE RESULTS FOR MODIFIED GIVENS
00127       DATA DTRUE/0.E0,0.E0, 1.3E0, .2E0, 0.E0,0.E0,0.E0, .5E0, 0.E0,
00128      A           0.E0,0.E0, 4.5E0, 4.2E0, 1.E0, .5E0, 0.E0,0.E0,0.E0,
00129      B           0.E0,0.E0,0.E0,0.E0, -2.E0, 0.E0,0.E0,0.E0,0.E0,
00130      C           0.E0,0.E0,0.E0, 4.E0, -1.E0, 0.E0,0.E0,0.E0,0.E0,
00131      D           0.E0, 15.E-3, 0.E0, 10.E0, -1.E0, 0.E0, -1.E-4,
00132      E           0.E0, 1.E0,
00133      F           0.E0,0.E0, 6144.E-5, 10.E0, -1.E0, 4096.E0, -1.E6,
00134      G           0.E0, 1.E0,
00135      H           0.E0,0.E0,15.E0,10.E0,-1.E0, 5.E-5, 0.E0,1.E0,0.E0,
00136      I           0.E0,0.E0, 15.E0, 10.E0, -1. E0, 5.E5, -4096.E0,
00137      J           1.E0, 4096.E-6,
00138      K           0.E0,0.E0, 7.E0, 4.E0, 0.E0,0.E0, -.5E0, -.25E0, 0.E0/
00139 *                   4096 = 2 ** 12
00140       DATA D12  /4096.E0/
00141       DTRUE(1,1) = 12.E0 / 130.E0
00142       DTRUE(2,1) = 36.E0 / 130.E0
00143       DTRUE(7,1) = -1.E0 / 6.E0
00144       DTRUE(1,2) = 14.E0 / 75.E0
00145       DTRUE(2,2) = 49.E0 / 75.E0
00146       DTRUE(9,2) = 1.E0 / 7.E0
00147       DTRUE(1,5) = 45.E-11 * (D12 * D12)
00148       DTRUE(3,5) = 4.E5 / (3.E0 * D12)
00149       DTRUE(6,5) = 1.E0 / D12
00150       DTRUE(8,5) = 1.E4 / (3.E0 * D12)
00151       DTRUE(1,6) = 4.E10 / (1.5E0 * D12 * D12)
00152       DTRUE(2,6) = 2.E-2 / 1.5E0
00153       DTRUE(8,6) = 5.E-7 * D12
00154       DTRUE(1,7) = 4.E0 / 150.E0
00155       DTRUE(2,7) = (2.E-10 / 1.5E0) * (D12 * D12)
00156       DTRUE(7,7) = -DTRUE(6,5)
00157       DTRUE(9,7) = 1.E4 / D12
00158       DTRUE(1,8) = DTRUE(1,7)
00159       DTRUE(2,8) = 2.E10 / (1.5E0 * D12 * D12)
00160       DTRUE(1,9) = 32.E0 / 7.E0
00161       DTRUE(2,9) = -16.E0 / 7.E0
00162 *     .. Executable Statements ..
00163 *
00164 *     Compute true values which cannot be prestored
00165 *     in decimal notation
00166 *
00167       DBTRUE(1) = 1.0E0/0.6E0
00168       DBTRUE(3) = -1.0E0/0.6E0
00169       DBTRUE(5) = 1.0E0/0.6E0
00170 *
00171       DO 20 K = 1, 8
00172 *        .. Set N=K for identification in output if any ..
00173          N = K
00174          IF (ICASE.EQ.3) THEN
00175 *           .. SROTG ..
00176             IF (K.GT.8) GO TO 40
00177             SA = DA1(K)
00178             SB = DB1(K)
00179             CALL SROTG(SA,SB,SC,SS)
00180             CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC)
00181             CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)
00182             CALL STEST1(SC,DC1(K),DC1(K),SFAC)
00183             CALL STEST1(SS,DS1(K),DS1(K),SFAC)
00184          ELSEIF (ICASE.EQ.11) THEN
00185 *           .. SROTMG ..
00186             DO I=1,4
00187                DTEMP(I)= DAB(I,K)
00188                DTEMP(I+4) = 0.0
00189             END DO
00190             DTEMP(9) = 0.0
00191             CALL SROTMG(DTEMP(1),DTEMP(2),DTEMP(3),DTEMP(4),DTEMP(5))
00192             CALL STEST(9,DTEMP,DTRUE(1,K),DTRUE(1,K),SFAC)
00193          ELSE
00194             WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
00195             STOP
00196          END IF
00197    20 CONTINUE
00198    40 RETURN
00199       END
00200       SUBROUTINE CHECK1(SFAC)
00201 *     .. Parameters ..
00202       INTEGER           NOUT
00203       PARAMETER         (NOUT=6)
00204 *     .. Scalar Arguments ..
00205       REAL              SFAC
00206 *     .. Scalars in Common ..
00207       INTEGER           ICASE, INCX, INCY, N
00208       LOGICAL           PASS
00209 *     .. Local Scalars ..
00210       INTEGER           I, LEN, NP1
00211 *     .. Local Arrays ..
00212       REAL              DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),
00213      +                  SA(10), STEMP(1), STRUE(8), SX(8)
00214       INTEGER           ITRUE2(5)
00215 *     .. External Functions ..
00216       REAL              SASUM, SNRM2
00217       INTEGER           ISAMAX
00218       EXTERNAL          SASUM, SNRM2, ISAMAX
00219 *     .. External Subroutines ..
00220       EXTERNAL          ITEST1, SSCAL, STEST, STEST1
00221 *     .. Intrinsic Functions ..
00222       INTRINSIC         MAX
00223 *     .. Common blocks ..
00224       COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS
00225 *     .. Data statements ..
00226       DATA              SA/0.3E0, -1.0E0, 0.0E0, 1.0E0, 0.3E0, 0.3E0,
00227      +                  0.3E0, 0.3E0, 0.3E0, 0.3E0/
00228       DATA              DV/0.1E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,
00229      +                  2.0E0, 2.0E0, 0.3E0, 3.0E0, 3.0E0, 3.0E0, 3.0E0,
00230      +                  3.0E0, 3.0E0, 3.0E0, 0.3E0, -0.4E0, 4.0E0,
00231      +                  4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, 0.2E0,
00232      +                  -0.6E0, 0.3E0, 5.0E0, 5.0E0, 5.0E0, 5.0E0,
00233      +                  5.0E0, 0.1E0, -0.3E0, 0.5E0, -0.1E0, 6.0E0,
00234      +                  6.0E0, 6.0E0, 6.0E0, 0.1E0, 8.0E0, 8.0E0, 8.0E0,
00235      +                  8.0E0, 8.0E0, 8.0E0, 8.0E0, 0.3E0, 9.0E0, 9.0E0,
00236      +                  9.0E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, 0.3E0, 2.0E0,
00237      +                  -0.4E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,
00238      +                  0.2E0, 3.0E0, -0.6E0, 5.0E0, 0.3E0, 2.0E0,
00239      +                  2.0E0, 2.0E0, 0.1E0, 4.0E0, -0.3E0, 6.0E0,
00240      +                  -0.5E0, 7.0E0, -0.1E0, 3.0E0/
00241       DATA              DTRUE1/0.0E0, 0.3E0, 0.5E0, 0.7E0, 0.6E0/
00242       DATA              DTRUE3/0.0E0, 0.3E0, 0.7E0, 1.1E0, 1.0E0/
00243       DATA              DTRUE5/0.10E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,
00244      +                  2.0E0, 2.0E0, 2.0E0, -0.3E0, 3.0E0, 3.0E0,
00245      +                  3.0E0, 3.0E0, 3.0E0, 3.0E0, 3.0E0, 0.0E0, 0.0E0,
00246      +                  4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0,
00247      +                  0.20E0, -0.60E0, 0.30E0, 5.0E0, 5.0E0, 5.0E0,
00248      +                  5.0E0, 5.0E0, 0.03E0, -0.09E0, 0.15E0, -0.03E0,
00249      +                  6.0E0, 6.0E0, 6.0E0, 6.0E0, 0.10E0, 8.0E0,
00250      +                  8.0E0, 8.0E0, 8.0E0, 8.0E0, 8.0E0, 8.0E0,
00251      +                  0.09E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0,
00252      +                  9.0E0, 9.0E0, 0.09E0, 2.0E0, -0.12E0, 2.0E0,
00253      +                  2.0E0, 2.0E0, 2.0E0, 2.0E0, 0.06E0, 3.0E0,
00254      +                  -0.18E0, 5.0E0, 0.09E0, 2.0E0, 2.0E0, 2.0E0,
00255      +                  0.03E0, 4.0E0, -0.09E0, 6.0E0, -0.15E0, 7.0E0,
00256      +                  -0.03E0, 3.0E0/
00257       DATA              ITRUE2/0, 1, 2, 2, 3/
00258 *     .. Executable Statements ..
00259       DO 80 INCX = 1, 2
00260          DO 60 NP1 = 1, 5
00261             N = NP1 - 1
00262             LEN = 2*MAX(N,1)
00263 *           .. Set vector arguments ..
00264             DO 20 I = 1, LEN
00265                SX(I) = DV(I,NP1,INCX)
00266    20       CONTINUE
00267 *
00268             IF (ICASE.EQ.7) THEN
00269 *              .. SNRM2 ..
00270                STEMP(1) = DTRUE1(NP1)
00271                CALL STEST1(SNRM2(N,SX,INCX),STEMP(1),STEMP,SFAC)
00272             ELSE IF (ICASE.EQ.8) THEN
00273 *              .. SASUM ..
00274                STEMP(1) = DTRUE3(NP1)
00275                CALL STEST1(SASUM(N,SX,INCX),STEMP(1),STEMP,SFAC)
00276             ELSE IF (ICASE.EQ.9) THEN
00277 *              .. SSCAL ..
00278                CALL SSCAL(N,SA((INCX-1)*5+NP1),SX,INCX)
00279                DO 40 I = 1, LEN
00280                   STRUE(I) = DTRUE5(I,NP1,INCX)
00281    40          CONTINUE
00282                CALL STEST(LEN,SX,STRUE,STRUE,SFAC)
00283             ELSE IF (ICASE.EQ.10) THEN
00284 *              .. ISAMAX ..
00285                CALL ITEST1(ISAMAX(N,SX,INCX),ITRUE2(NP1))
00286             ELSE
00287                WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
00288                STOP
00289             END IF
00290    60    CONTINUE
00291    80 CONTINUE
00292       RETURN
00293       END
00294       SUBROUTINE CHECK2(SFAC)
00295 *     .. Parameters ..
00296       INTEGER           NOUT
00297       PARAMETER         (NOUT=6)
00298 *     .. Scalar Arguments ..
00299       REAL              SFAC
00300 *     .. Scalars in Common ..
00301       INTEGER           ICASE, INCX, INCY, N
00302       LOGICAL           PASS
00303 *     .. Local Scalars ..
00304       REAL              SA
00305       INTEGER           I, J, KI, KN, KNI, KPAR, KSIZE, LENX, LENY,
00306      $                  MX, MY 
00307 *     .. Local Arrays ..
00308       REAL              DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),
00309      $                  DT8(7,4,4), DX1(7),
00310      $                  DY1(7), SSIZE1(4), SSIZE2(14,2), SSIZE3(4),
00311      $                  SSIZE(7), STX(7), STY(7), SX(7), SY(7),
00312      $                  DPAR(5,4), DT19X(7,4,16),DT19XA(7,4,4),
00313      $                  DT19XB(7,4,4), DT19XC(7,4,4),DT19XD(7,4,4),
00314      $                  DT19Y(7,4,16), DT19YA(7,4,4),DT19YB(7,4,4),
00315      $                  DT19YC(7,4,4), DT19YD(7,4,4), DTEMP(5),
00316      $                  ST7B(4,4)
00317       INTEGER           INCXS(4), INCYS(4), LENS(4,2), NS(4)
00318 *     .. External Functions ..
00319       REAL              SDOT, SDSDOT
00320       EXTERNAL          SDOT, SDSDOT
00321 *     .. External Subroutines ..
00322       EXTERNAL          SAXPY, SCOPY, SROTM, SSWAP, STEST, STEST1
00323 *     .. Intrinsic Functions ..
00324       INTRINSIC         ABS, MIN
00325 *     .. Common blocks ..
00326       COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS
00327 *     .. Data statements ..
00328       EQUIVALENCE (DT19X(1,1,1),DT19XA(1,1,1)),(DT19X(1,1,5),
00329      A   DT19XB(1,1,1)),(DT19X(1,1,9),DT19XC(1,1,1)),
00330      B   (DT19X(1,1,13),DT19XD(1,1,1))
00331       EQUIVALENCE (DT19Y(1,1,1),DT19YA(1,1,1)),(DT19Y(1,1,5),
00332      A   DT19YB(1,1,1)),(DT19Y(1,1,9),DT19YC(1,1,1)),
00333      B   (DT19Y(1,1,13),DT19YD(1,1,1))
00334 
00335       DATA              SA/0.3E0/
00336       DATA              INCXS/1, 2, -2, -1/
00337       DATA              INCYS/1, -2, 1, -2/
00338       DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/
00339       DATA              NS/0, 1, 2, 4/
00340       DATA              DX1/0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.9E0, -0.3E0,
00341      +                  -0.4E0/
00342       DATA              DY1/0.5E0, -0.9E0, 0.3E0, 0.7E0, -0.6E0, 0.2E0,
00343      +                  0.8E0/
00344       DATA              DT7/0.0E0, 0.30E0, 0.21E0, 0.62E0, 0.0E0,
00345      +                  0.30E0, -0.07E0, 0.85E0, 0.0E0, 0.30E0, -0.79E0,
00346      +                  -0.74E0, 0.0E0, 0.30E0, 0.33E0, 1.27E0/
00347       DATA              ST7B/ .1, .4, .31, .72,     .1, .4, .03, .95,
00348      +                  .1, .4, -.69, -.64,   .1, .4, .43, 1.37/
00349       DATA              DT8/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00350      +                  0.0E0, 0.68E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00351      +                  0.0E0, 0.0E0, 0.68E0, -0.87E0, 0.0E0, 0.0E0,
00352      +                  0.0E0, 0.0E0, 0.0E0, 0.68E0, -0.87E0, 0.15E0,
00353      +                  0.94E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0,
00354      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.68E0,
00355      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00356      +                  0.35E0, -0.9E0, 0.48E0, 0.0E0, 0.0E0, 0.0E0,
00357      +                  0.0E0, 0.38E0, -0.9E0, 0.57E0, 0.7E0, -0.75E0,
00358      +                  0.2E0, 0.98E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0,
00359      +                  0.0E0, 0.0E0, 0.0E0, 0.68E0, 0.0E0, 0.0E0,
00360      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.35E0, -0.72E0,
00361      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.38E0,
00362      +                  -0.63E0, 0.15E0, 0.88E0, 0.0E0, 0.0E0, 0.0E0,
00363      +                  0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00364      +                  0.68E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00365      +                  0.0E0, 0.68E0, -0.9E0, 0.33E0, 0.0E0, 0.0E0,
00366      +                  0.0E0, 0.0E0, 0.68E0, -0.9E0, 0.33E0, 0.7E0,
00367      +                  -0.75E0, 0.2E0, 1.04E0/
00368       DATA              DT10X/0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00369      +                  0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00370      +                  0.0E0, 0.5E0, -0.9E0, 0.0E0, 0.0E0, 0.0E0,
00371      +                  0.0E0, 0.0E0, 0.5E0, -0.9E0, 0.3E0, 0.7E0,
00372      +                  0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0,
00373      +                  0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0,
00374      +                  0.0E0, 0.0E0, 0.0E0, 0.3E0, 0.1E0, 0.5E0, 0.0E0,
00375      +                  0.0E0, 0.0E0, 0.0E0, 0.8E0, 0.1E0, -0.6E0,
00376      +                  0.8E0, 0.3E0, -0.3E0, 0.5E0, 0.6E0, 0.0E0,
00377      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0,
00378      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.9E0,
00379      +                  0.1E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.7E0,
00380      +                  0.1E0, 0.3E0, 0.8E0, -0.9E0, -0.3E0, 0.5E0,
00381      +                  0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00382      +                  0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00383      +                  0.5E0, 0.3E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00384      +                  0.5E0, 0.3E0, -0.6E0, 0.8E0, 0.0E0, 0.0E0,
00385      +                  0.0E0/
00386       DATA              DT10Y/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00387      +                  0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00388      +                  0.0E0, 0.6E0, 0.1E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00389      +                  0.0E0, 0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.0E0,
00390      +                  0.0E0, 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00391      +                  0.0E0, 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00392      +                  0.0E0, 0.0E0, -0.5E0, -0.9E0, 0.6E0, 0.0E0,
00393      +                  0.0E0, 0.0E0, 0.0E0, -0.4E0, -0.9E0, 0.9E0,
00394      +                  0.7E0, -0.5E0, 0.2E0, 0.6E0, 0.5E0, 0.0E0,
00395      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0,
00396      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.5E0,
00397      +                  0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00398      +                  -0.4E0, 0.9E0, -0.5E0, 0.6E0, 0.0E0, 0.0E0,
00399      +                  0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00400      +                  0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00401      +                  0.0E0, 0.6E0, -0.9E0, 0.1E0, 0.0E0, 0.0E0,
00402      +                  0.0E0, 0.0E0, 0.6E0, -0.9E0, 0.1E0, 0.7E0,
00403      +                  -0.5E0, 0.2E0, 0.8E0/
00404       DATA              SSIZE1/0.0E0, 0.3E0, 1.6E0, 3.2E0/
00405       DATA              SSIZE2/0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00406      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00407      +                  0.0E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,
00408      +                  1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,
00409      +                  1.17E0, 1.17E0, 1.17E0/
00410       DATA              SSIZE3/ .1, .4, 1.7, 3.3 /
00411 *
00412 *                         FOR DROTM
00413 *
00414       DATA DPAR/-2.E0,  0.E0,0.E0,0.E0,0.E0,
00415      A          -1.E0,  2.E0, -3.E0, -4.E0,  5.E0,
00416      B           0.E0,  0.E0,  2.E0, -3.E0,  0.E0,
00417      C           1.E0,  5.E0,  2.E0,  0.E0, -4.E0/
00418 *                        TRUE X RESULTS F0R ROTATIONS DROTM
00419       DATA DT19XA/.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00420      A            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00421      B            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00422      C            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00423      D            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00424      E           -.8E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00425      F           -.9E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00426      G           3.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00427      H            .6E0,   .1E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00428      I           -.8E0,  3.8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00429      J           -.9E0,  2.8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00430      K           3.5E0,  -.4E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00431      L            .6E0,   .1E0,  -.5E0,   .8E0,          0.E0,0.E0,0.E0,
00432      M           -.8E0,  3.8E0, -2.2E0, -1.2E0,          0.E0,0.E0,0.E0,
00433      N           -.9E0,  2.8E0, -1.4E0, -1.3E0,          0.E0,0.E0,0.E0,
00434      O           3.5E0,  -.4E0, -2.2E0,  4.7E0,          0.E0,0.E0,0.E0/
00435 *
00436       DATA DT19XB/.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00437      A            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00438      B            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00439      C            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00440      D            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00441      E           -.8E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00442      F           -.9E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00443      G           3.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00444      H            .6E0,   .1E0,  -.5E0,             0.E0,0.E0,0.E0,0.E0,
00445      I           0.E0,    .1E0, -3.0E0,             0.E0,0.E0,0.E0,0.E0,
00446      J           -.3E0,   .1E0, -2.0E0,             0.E0,0.E0,0.E0,0.E0,
00447      K           3.3E0,   .1E0, -2.0E0,             0.E0,0.E0,0.E0,0.E0,
00448      L            .6E0,   .1E0,  -.5E0,   .8E0,   .9E0,  -.3E0,  -.4E0,
00449      M          -2.0E0,   .1E0,  1.4E0,   .8E0,   .6E0,  -.3E0, -2.8E0,
00450      N          -1.8E0,   .1E0,  1.3E0,   .8E0,  0.E0,   -.3E0, -1.9E0,
00451      O           3.8E0,   .1E0, -3.1E0,   .8E0,  4.8E0,  -.3E0, -1.5E0 /
00452 *
00453       DATA DT19XC/.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00454      A            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00455      B            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00456      C            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00457      D            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00458      E           -.8E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00459      F           -.9E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00460      G           3.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00461      H            .6E0,   .1E0,  -.5E0,             0.E0,0.E0,0.E0,0.E0,
00462      I           4.8E0,   .1E0, -3.0E0,             0.E0,0.E0,0.E0,0.E0,
00463      J           3.3E0,   .1E0, -2.0E0,             0.E0,0.E0,0.E0,0.E0,
00464      K           2.1E0,   .1E0, -2.0E0,             0.E0,0.E0,0.E0,0.E0,
00465      L            .6E0,   .1E0,  -.5E0,   .8E0,   .9E0,  -.3E0,  -.4E0,
00466      M          -1.6E0,   .1E0, -2.2E0,   .8E0,  5.4E0,  -.3E0, -2.8E0,
00467      N          -1.5E0,   .1E0, -1.4E0,   .8E0,  3.6E0,  -.3E0, -1.9E0,
00468      O           3.7E0,   .1E0, -2.2E0,   .8E0,  3.6E0,  -.3E0, -1.5E0 /
00469 *
00470       DATA DT19XD/.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00471      A            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00472      B            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00473      C            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00474      D            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00475      E           -.8E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00476      F           -.9E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00477      G           3.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00478      H            .6E0,   .1E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00479      I           -.8E0, -1.0E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00480      J           -.9E0,  -.8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00481      K           3.5E0,   .8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00482      L            .6E0,   .1E0,  -.5E0,   .8E0,          0.E0,0.E0,0.E0,
00483      M           -.8E0, -1.0E0,  1.4E0, -1.6E0,          0.E0,0.E0,0.E0,
00484      N           -.9E0,  -.8E0,  1.3E0, -1.6E0,          0.E0,0.E0,0.E0,
00485      O           3.5E0,   .8E0, -3.1E0,  4.8E0,          0.E0,0.E0,0.E0/
00486 *                        TRUE Y RESULTS FOR ROTATIONS DROTM
00487       DATA DT19YA/.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00488      A            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00489      B            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00490      C            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00491      D            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00492      E            .7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00493      F           1.7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00494      G          -2.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00495      H            .5E0,  -.9E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00496      I            .7E0, -4.8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00497      J           1.7E0,  -.7E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00498      K          -2.6E0,  3.5E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00499      L            .5E0,  -.9E0,   .3E0,   .7E0,          0.E0,0.E0,0.E0,
00500      M            .7E0, -4.8E0,  3.0E0,  1.1E0,          0.E0,0.E0,0.E0,
00501      N           1.7E0,  -.7E0,  -.7E0,  2.3E0,          0.E0,0.E0,0.E0,
00502      O          -2.6E0,  3.5E0,  -.7E0, -3.6E0,          0.E0,0.E0,0.E0/
00503 *
00504       DATA DT19YB/.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00505      A            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00506      B            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00507      C            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00508      D            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00509      E            .7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00510      F           1.7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00511      G          -2.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00512      H            .5E0,  -.9E0,   .3E0,             0.E0,0.E0,0.E0,0.E0,
00513      I           4.0E0,  -.9E0,  -.3E0,             0.E0,0.E0,0.E0,0.E0,
00514      J           -.5E0,  -.9E0,  1.5E0,             0.E0,0.E0,0.E0,0.E0,
00515      K          -1.5E0,  -.9E0, -1.8E0,             0.E0,0.E0,0.E0,0.E0,
00516      L            .5E0,  -.9E0,   .3E0,   .7E0,  -.6E0,   .2E0,   .8E0,
00517      M           3.7E0,  -.9E0, -1.2E0,   .7E0, -1.5E0,   .2E0,  2.2E0,
00518      N           -.3E0,  -.9E0,  2.1E0,   .7E0, -1.6E0,   .2E0,  2.0E0,
00519      O          -1.6E0,  -.9E0, -2.1E0,   .7E0,  2.9E0,   .2E0, -3.8E0 /
00520 *
00521       DATA DT19YC/.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00522      A            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00523      B            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00524      C            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00525      D            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00526      E            .7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00527      F           1.7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00528      G          -2.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00529      H            .5E0,  -.9E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00530      I           4.0E0, -6.3E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00531      J           -.5E0,   .3E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00532      K          -1.5E0,  3.0E0,             0.E0,0.E0,0.E0,0.E0,0.E0,
00533      L            .5E0,  -.9E0,   .3E0,   .7E0,          0.E0,0.E0,0.E0,
00534      M           3.7E0, -7.2E0,  3.0E0,  1.7E0,          0.E0,0.E0,0.E0,
00535      N           -.3E0,   .9E0,  -.7E0,  1.9E0,          0.E0,0.E0,0.E0,
00536      O          -1.6E0,  2.7E0,  -.7E0, -3.4E0,          0.E0,0.E0,0.E0/
00537 *
00538       DATA DT19YD/.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00539      A            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00540      B            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00541      C            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00542      D            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00543      E            .7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00544      F           1.7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00545      G          -2.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
00546      H            .5E0,  -.9E0,   .3E0,             0.E0,0.E0,0.E0,0.E0,
00547      I            .7E0,  -.9E0,  1.2E0,             0.E0,0.E0,0.E0,0.E0,
00548      J           1.7E0,  -.9E0,   .5E0,             0.E0,0.E0,0.E0,0.E0,
00549      K          -2.6E0,  -.9E0, -1.3E0,             0.E0,0.E0,0.E0,0.E0,
00550      L            .5E0,  -.9E0,   .3E0,   .7E0,  -.6E0,   .2E0,   .8E0,
00551      M            .7E0,  -.9E0,  1.2E0,   .7E0, -1.5E0,   .2E0,  1.6E0,
00552      N           1.7E0,  -.9E0,   .5E0,   .7E0, -1.6E0,   .2E0,  2.4E0,
00553      O          -2.6E0,  -.9E0, -1.3E0,   .7E0,  2.9E0,   .2E0, -4.0E0 /
00554 *
00555 *     .. Executable Statements ..
00556 *
00557       DO 120 KI = 1, 4
00558          INCX = INCXS(KI)
00559          INCY = INCYS(KI)
00560          MX = ABS(INCX)
00561          MY = ABS(INCY)
00562 *
00563          DO 100 KN = 1, 4
00564             N = NS(KN)
00565             KSIZE = MIN(2,KN)
00566             LENX = LENS(KN,MX)
00567             LENY = LENS(KN,MY)
00568 *           .. Initialize all argument arrays ..
00569             DO 20 I = 1, 7
00570                SX(I) = DX1(I)
00571                SY(I) = DY1(I)
00572    20       CONTINUE
00573 *
00574             IF (ICASE.EQ.1) THEN
00575 *              .. SDOT ..
00576                CALL STEST1(SDOT(N,SX,INCX,SY,INCY),DT7(KN,KI),SSIZE1(KN)
00577      +                     ,SFAC)
00578             ELSE IF (ICASE.EQ.2) THEN
00579 *              .. SAXPY ..
00580                CALL SAXPY(N,SA,SX,INCX,SY,INCY)
00581                DO 40 J = 1, LENY
00582                   STY(J) = DT8(J,KN,KI)
00583    40          CONTINUE
00584                CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
00585             ELSE IF (ICASE.EQ.5) THEN
00586 *              .. SCOPY ..
00587                DO 60 I = 1, 7
00588                   STY(I) = DT10Y(I,KN,KI)
00589    60          CONTINUE
00590                CALL SCOPY(N,SX,INCX,SY,INCY)
00591                CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)
00592             ELSE IF (ICASE.EQ.6) THEN
00593 *              .. SSWAP ..
00594                CALL SSWAP(N,SX,INCX,SY,INCY)
00595                DO 80 I = 1, 7
00596                   STX(I) = DT10X(I,KN,KI)
00597                   STY(I) = DT10Y(I,KN,KI)
00598    80          CONTINUE
00599                CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0E0)
00600                CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)
00601             ELSEIF (ICASE.EQ.12) THEN
00602 *              .. SROTM ..
00603                KNI=KN+4*(KI-1)
00604                DO KPAR=1,4
00605                   DO I=1,7
00606                      SX(I) = DX1(I)
00607                      SY(I) = DY1(I)
00608                      STX(I)= DT19X(I,KPAR,KNI)
00609                      STY(I)= DT19Y(I,KPAR,KNI)
00610                   END DO
00611 *
00612                   DO I=1,5
00613                      DTEMP(I) = DPAR(I,KPAR)
00614                   END DO
00615 *
00616                   DO  I=1,LENX
00617                      SSIZE(I)=STX(I)
00618                   END DO
00619 *                   SEE REMARK ABOVE ABOUT DT11X(1,2,7)
00620 *                       AND DT11X(5,3,8).
00621                   IF ((KPAR .EQ. 2) .AND. (KNI .EQ. 7))
00622      $               SSIZE(1) = 2.4E0
00623                   IF ((KPAR .EQ. 3) .AND. (KNI .EQ. 8))
00624      $               SSIZE(5) = 1.8E0
00625 *
00626                   CALL   SROTM(N,SX,INCX,SY,INCY,DTEMP)
00627                   CALL   STEST(LENX,SX,STX,SSIZE,SFAC)
00628                   CALL   STEST(LENY,SY,STY,STY,SFAC)
00629                END DO
00630             ELSEIF (ICASE.EQ.13) THEN
00631 *              .. SDSROT ..
00632                CALL STEST1 (SDSDOT(N,.1,SX,INCX,SY,INCY),
00633      $                 ST7B(KN,KI),SSIZE3(KN),SFAC)
00634             ELSE
00635                WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
00636                STOP
00637             END IF
00638   100    CONTINUE
00639   120 CONTINUE
00640       RETURN
00641       END
00642       SUBROUTINE CHECK3(SFAC)
00643 *     .. Parameters ..
00644       INTEGER           NOUT
00645       PARAMETER         (NOUT=6)
00646 *     .. Scalar Arguments ..
00647       REAL              SFAC
00648 *     .. Scalars in Common ..
00649       INTEGER           ICASE, INCX, INCY, N
00650       LOGICAL           PASS
00651 *     .. Local Scalars ..
00652       REAL              SC, SS
00653       INTEGER           I, K, KI, KN, KSIZE, LENX, LENY, MX, MY
00654 *     .. Local Arrays ..
00655       REAL              COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4),
00656      +                  DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5),
00657      +                  MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5),
00658      +                  MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7),
00659      +                  SY(7)
00660       INTEGER           INCXS(4), INCYS(4), LENS(4,2), MWPINX(11),
00661      +                  MWPINY(11), MWPN(11), NS(4)
00662 *     .. External Subroutines ..
00663       EXTERNAL          SROT, STEST
00664 *     .. Intrinsic Functions ..
00665       INTRINSIC         ABS, MIN
00666 *     .. Common blocks ..
00667       COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS
00668 *     .. Data statements ..
00669       DATA              INCXS/1, 2, -2, -1/
00670       DATA              INCYS/1, -2, 1, -2/
00671       DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/
00672       DATA              NS/0, 1, 2, 4/
00673       DATA              DX1/0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.9E0, -0.3E0,
00674      +                  -0.4E0/
00675       DATA              DY1/0.5E0, -0.9E0, 0.3E0, 0.7E0, -0.6E0, 0.2E0,
00676      +                  0.8E0/
00677       DATA              SC, SS/0.8E0, 0.6E0/
00678       DATA              DT9X/0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00679      +                  0.0E0, 0.78E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00680      +                  0.0E0, 0.0E0, 0.78E0, -0.46E0, 0.0E0, 0.0E0,
00681      +                  0.0E0, 0.0E0, 0.0E0, 0.78E0, -0.46E0, -0.22E0,
00682      +                  1.06E0, 0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0,
00683      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.78E0,
00684      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00685      +                  0.66E0, 0.1E0, -0.1E0, 0.0E0, 0.0E0, 0.0E0,
00686      +                  0.0E0, 0.96E0, 0.1E0, -0.76E0, 0.8E0, 0.90E0,
00687      +                  -0.3E0, -0.02E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0,
00688      +                  0.0E0, 0.0E0, 0.0E0, 0.78E0, 0.0E0, 0.0E0,
00689      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.06E0, 0.1E0,
00690      +                  -0.1E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.90E0,
00691      +                  0.1E0, -0.22E0, 0.8E0, 0.18E0, -0.3E0, -0.02E0,
00692      +                  0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00693      +                  0.78E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00694      +                  0.0E0, 0.78E0, 0.26E0, 0.0E0, 0.0E0, 0.0E0,
00695      +                  0.0E0, 0.0E0, 0.78E0, 0.26E0, -0.76E0, 1.12E0,
00696      +                  0.0E0, 0.0E0, 0.0E0/
00697       DATA              DT9Y/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00698      +                  0.0E0, 0.04E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00699      +                  0.0E0, 0.0E0, 0.04E0, -0.78E0, 0.0E0, 0.0E0,
00700      +                  0.0E0, 0.0E0, 0.0E0, 0.04E0, -0.78E0, 0.54E0,
00701      +                  0.08E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0,
00702      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.04E0,
00703      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.7E0,
00704      +                  -0.9E0, -0.12E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00705      +                  0.64E0, -0.9E0, -0.30E0, 0.7E0, -0.18E0, 0.2E0,
00706      +                  0.28E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00707      +                  0.0E0, 0.0E0, 0.04E0, 0.0E0, 0.0E0, 0.0E0,
00708      +                  0.0E0, 0.0E0, 0.0E0, 0.7E0, -1.08E0, 0.0E0,
00709      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.64E0, -1.26E0,
00710      +                  0.54E0, 0.20E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0,
00711      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00712      +                  0.04E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00713      +                  0.0E0, 0.04E0, -0.9E0, 0.18E0, 0.0E0, 0.0E0,
00714      +                  0.0E0, 0.0E0, 0.04E0, -0.9E0, 0.18E0, 0.7E0,
00715      +                  -0.18E0, 0.2E0, 0.16E0/
00716       DATA              SSIZE2/0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00717      +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
00718      +                  0.0E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,
00719      +                  1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,
00720      +                  1.17E0, 1.17E0, 1.17E0/
00721 *     .. Executable Statements ..
00722 *
00723       DO 60 KI = 1, 4
00724          INCX = INCXS(KI)
00725          INCY = INCYS(KI)
00726          MX = ABS(INCX)
00727          MY = ABS(INCY)
00728 *
00729          DO 40 KN = 1, 4
00730             N = NS(KN)
00731             KSIZE = MIN(2,KN)
00732             LENX = LENS(KN,MX)
00733             LENY = LENS(KN,MY)
00734 *
00735             IF (ICASE.EQ.4) THEN
00736 *              .. SROT ..
00737                DO 20 I = 1, 7
00738                   SX(I) = DX1(I)
00739                   SY(I) = DY1(I)
00740                   STX(I) = DT9X(I,KN,KI)
00741                   STY(I) = DT9Y(I,KN,KI)
00742    20          CONTINUE
00743                CALL SROT(N,SX,INCX,SY,INCY,SC,SS)
00744                CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC)
00745                CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)
00746             ELSE
00747                WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'
00748                STOP
00749             END IF
00750    40    CONTINUE
00751    60 CONTINUE
00752 *
00753       MWPC(1) = 1
00754       DO 80 I = 2, 11
00755          MWPC(I) = 0
00756    80 CONTINUE
00757       MWPS(1) = 0
00758       DO 100 I = 2, 6
00759          MWPS(I) = 1
00760   100 CONTINUE
00761       DO 120 I = 7, 11
00762          MWPS(I) = -1
00763   120 CONTINUE
00764       MWPINX(1) = 1
00765       MWPINX(2) = 1
00766       MWPINX(3) = 1
00767       MWPINX(4) = -1
00768       MWPINX(5) = 1
00769       MWPINX(6) = -1
00770       MWPINX(7) = 1
00771       MWPINX(8) = 1
00772       MWPINX(9) = -1
00773       MWPINX(10) = 1
00774       MWPINX(11) = -1
00775       MWPINY(1) = 1
00776       MWPINY(2) = 1
00777       MWPINY(3) = -1
00778       MWPINY(4) = -1
00779       MWPINY(5) = 2
00780       MWPINY(6) = 1
00781       MWPINY(7) = 1
00782       MWPINY(8) = -1
00783       MWPINY(9) = -1
00784       MWPINY(10) = 2
00785       MWPINY(11) = 1
00786       DO 140 I = 1, 11
00787          MWPN(I) = 5
00788   140 CONTINUE
00789       MWPN(5) = 3
00790       MWPN(10) = 3
00791       DO 160 I = 1, 5
00792          MWPX(I) = I
00793          MWPY(I) = I
00794          MWPTX(1,I) = I
00795          MWPTY(1,I) = I
00796          MWPTX(2,I) = I
00797          MWPTY(2,I) = -I
00798          MWPTX(3,I) = 6 - I
00799          MWPTY(3,I) = I - 6
00800          MWPTX(4,I) = I
00801          MWPTY(4,I) = -I
00802          MWPTX(6,I) = 6 - I
00803          MWPTY(6,I) = I - 6
00804          MWPTX(7,I) = -I
00805          MWPTY(7,I) = I
00806          MWPTX(8,I) = I - 6
00807          MWPTY(8,I) = 6 - I
00808          MWPTX(9,I) = -I
00809          MWPTY(9,I) = I
00810          MWPTX(11,I) = I - 6
00811          MWPTY(11,I) = 6 - I
00812   160 CONTINUE
00813       MWPTX(5,1) = 1
00814       MWPTX(5,2) = 3
00815       MWPTX(5,3) = 5
00816       MWPTX(5,4) = 4
00817       MWPTX(5,5) = 5
00818       MWPTY(5,1) = -1
00819       MWPTY(5,2) = 2
00820       MWPTY(5,3) = -2
00821       MWPTY(5,4) = 4
00822       MWPTY(5,5) = -3
00823       MWPTX(10,1) = -1
00824       MWPTX(10,2) = -3
00825       MWPTX(10,3) = -5
00826       MWPTX(10,4) = 4
00827       MWPTX(10,5) = 5
00828       MWPTY(10,1) = 1
00829       MWPTY(10,2) = 2
00830       MWPTY(10,3) = 2
00831       MWPTY(10,4) = 4
00832       MWPTY(10,5) = 3
00833       DO 200 I = 1, 11
00834          INCX = MWPINX(I)
00835          INCY = MWPINY(I)
00836          DO 180 K = 1, 5
00837             COPYX(K) = MWPX(K)
00838             COPYY(K) = MWPY(K)
00839             MWPSTX(K) = MWPTX(I,K)
00840             MWPSTY(K) = MWPTY(I,K)
00841   180    CONTINUE
00842          CALL SROT(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I))
00843          CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC)
00844          CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC)
00845   200 CONTINUE
00846       RETURN
00847       END
00848       SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)
00849 *     ********************************* STEST **************************
00850 *
00851 *     THIS SUBR COMPARES ARRAYS  SCOMP() AND STRUE() OF LENGTH LEN TO
00852 *     SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
00853 *     NEGLIGIBLE.
00854 *
00855 *     C. L. LAWSON, JPL, 1974 DEC 10
00856 *
00857 *     .. Parameters ..
00858       INTEGER          NOUT
00859       PARAMETER        (NOUT=6)
00860 *     .. Scalar Arguments ..
00861       REAL             SFAC
00862       INTEGER          LEN
00863 *     .. Array Arguments ..
00864       REAL             SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
00865 *     .. Scalars in Common ..
00866       INTEGER          ICASE, INCX, INCY, N
00867       LOGICAL          PASS
00868 *     .. Local Scalars ..
00869       REAL             SD
00870       INTEGER          I
00871 *     .. External Functions ..
00872       REAL             SDIFF
00873       EXTERNAL         SDIFF
00874 *     .. Intrinsic Functions ..
00875       INTRINSIC        ABS
00876 *     .. Common blocks ..
00877       COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS
00878 *     .. Executable Statements ..
00879 *
00880       DO 40 I = 1, LEN
00881          SD = SCOMP(I) - STRUE(I)
00882          IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0E0)
00883      +       GO TO 40
00884 *
00885 *                             HERE    SCOMP(I) IS NOT CLOSE TO STRUE(I).
00886 *
00887          IF ( .NOT. PASS) GO TO 20
00888 *                             PRINT FAIL MESSAGE AND HEADER.
00889          PASS = .FALSE.
00890          WRITE (NOUT,99999)
00891          WRITE (NOUT,99998)
00892    20    WRITE (NOUT,99997) ICASE, N, INCX, INCY, I, SCOMP(I),
00893      +     STRUE(I), SD, SSIZE(I)
00894    40 CONTINUE
00895       RETURN
00896 *
00897 99999 FORMAT ('                                       FAIL')
00898 99998 FORMAT (/' CASE  N INCX INCY  I                            ',
00899      +       ' COMP(I)                             TRUE(I)  DIFFERENCE',
00900      +       '     SIZE(I)',/1X)
00901 99997 FORMAT (1X,I4,I3,2I5,I3,2E36.8,2E12.4)
00902       END
00903       SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
00904 *     ************************* STEST1 *****************************
00905 *
00906 *     THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN
00907 *     REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE
00908 *     ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.
00909 *
00910 *     C.L. LAWSON, JPL, 1978 DEC 6
00911 *
00912 *     .. Scalar Arguments ..
00913       REAL              SCOMP1, SFAC, STRUE1
00914 *     .. Array Arguments ..
00915       REAL              SSIZE(*)
00916 *     .. Local Arrays ..
00917       REAL              SCOMP(1), STRUE(1)
00918 *     .. External Subroutines ..
00919       EXTERNAL          STEST
00920 *     .. Executable Statements ..
00921 *
00922       SCOMP(1) = SCOMP1
00923       STRUE(1) = STRUE1
00924       CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)
00925 *
00926       RETURN
00927       END
00928       REAL             FUNCTION SDIFF(SA,SB)
00929 *     ********************************* SDIFF **************************
00930 *     COMPUTES DIFFERENCE OF TWO NUMBERS.  C. L. LAWSON, JPL 1974 FEB 15
00931 *
00932 *     .. Scalar Arguments ..
00933       REAL                            SA, SB
00934 *     .. Executable Statements ..
00935       SDIFF = SA - SB
00936       RETURN
00937       END
00938       SUBROUTINE ITEST1(ICOMP,ITRUE)
00939 *     ********************************* ITEST1 *************************
00940 *
00941 *     THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR
00942 *     EQUALITY.
00943 *     C. L. LAWSON, JPL, 1974 DEC 10
00944 *
00945 *     .. Parameters ..
00946       INTEGER           NOUT
00947       PARAMETER         (NOUT=6)
00948 *     .. Scalar Arguments ..
00949       INTEGER           ICOMP, ITRUE
00950 *     .. Scalars in Common ..
00951       INTEGER           ICASE, INCX, INCY, N
00952       LOGICAL           PASS
00953 *     .. Local Scalars ..
00954       INTEGER           ID
00955 *     .. Common blocks ..
00956       COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS
00957 *     .. Executable Statements ..
00958 *
00959       IF (ICOMP.EQ.ITRUE) GO TO 40
00960 *
00961 *                            HERE ICOMP IS NOT EQUAL TO ITRUE.
00962 *
00963       IF ( .NOT. PASS) GO TO 20
00964 *                             PRINT FAIL MESSAGE AND HEADER.
00965       PASS = .FALSE.
00966       WRITE (NOUT,99999)
00967       WRITE (NOUT,99998)
00968    20 ID = ICOMP - ITRUE
00969       WRITE (NOUT,99997) ICASE, N, INCX, INCY, ICOMP, ITRUE, ID
00970    40 CONTINUE
00971       RETURN
00972 *
00973 99999 FORMAT ('                                       FAIL')
00974 99998 FORMAT (/' CASE  N INCX INCY                               ',
00975      +       ' COMP                                TRUE     DIFFERENCE',
00976      +       /1X)
00977 99997 FORMAT (1X,I4,I3,2I5,2I36,I12)
00978       END
 All Files Functions