* ..
*
DFLAG = DPARAM(1)
- IF (N.LE.0 .OR. (DFLAG+TWO.EQ.ZERO)) GO TO 140
- IF (.NOT. (INCX.EQ.INCY.AND.INCX.GT.0)) GO TO 70
-*
- NSTEPS = N*INCX
- IF (DFLAG.LT.ZERO) THEN
- GO TO 50
- ELSE IF (DFLAG.EQ.ZERO) THEN
- GO TO 10
+ IF (N.LE.0 .OR. (DFLAG+TWO.EQ.ZERO)) RETURN
+ IF (INCX.EQ.INCY.AND.INCX.GT.0) THEN
+*
+ NSTEPS = N*INCX
+ IF (DFLAG.LT.ZERO) THEN
+ DH11 = DPARAM(2)
+ DH12 = DPARAM(4)
+ DH21 = DPARAM(3)
+ DH22 = DPARAM(5)
+ DO I = 1,NSTEPS,INCX
+ W = DX(I)
+ Z = DY(I)
+ DX(I) = W*DH11 + Z*DH12
+ DY(I) = W*DH21 + Z*DH22
+ END DO
+ ELSE IF (DFLAG.EQ.ZERO) THEN
+ DH12 = DPARAM(4)
+ DH21 = DPARAM(3)
+ DO I = 1,NSTEPS,INCX
+ W = DX(I)
+ Z = DY(I)
+ DX(I) = W + Z*DH12
+ DY(I) = W*DH21 + Z
+ END DO
+ ELSE
+ DH11 = DPARAM(2)
+ DH22 = DPARAM(5)
+ DO I = 1,NSTEPS,INCX
+ W = DX(I)
+ Z = DY(I)
+ DX(I) = W*DH11 + Z
+ DY(I) = -W + DH22*Z
+ END DO
+ END IF
ELSE
- GO TO 30
+ KX = 1
+ KY = 1
+ IF (INCX.LT.0) KX = 1 + (1-N)*INCX
+ IF (INCY.LT.0) KY = 1 + (1-N)*INCY
+*
+ IF (DFLAG.LT.ZERO) THEN
+ DH11 = DPARAM(2)
+ DH12 = DPARAM(4)
+ DH21 = DPARAM(3)
+ DH22 = DPARAM(5)
+ DO I = 1,N
+ W = DX(KX)
+ Z = DY(KY)
+ DX(KX) = W*DH11 + Z*DH12
+ DY(KY) = W*DH21 + Z*DH22
+ KX = KX + INCX
+ KY = KY + INCY
+ END DO
+ ELSE IF (DFLAG.EQ.ZERO) THEN
+ DH12 = DPARAM(4)
+ DH21 = DPARAM(3)
+ DO I = 1,N
+ W = DX(KX)
+ Z = DY(KY)
+ DX(KX) = W + Z*DH12
+ DY(KY) = W*DH21 + Z
+ KX = KX + INCX
+ KY = KY + INCY
+ END DO
+ ELSE
+ DH11 = DPARAM(2)
+ DH22 = DPARAM(5)
+ DO I = 1,N
+ W = DX(KX)
+ Z = DY(KY)
+ DX(KX) = W*DH11 + Z
+ DY(KY) = -W + DH22*Z
+ KX = KX + INCX
+ KY = KY + INCY
+ END DO
+ END IF
END IF
- 10 CONTINUE
- DH12 = DPARAM(4)
- DH21 = DPARAM(3)
- DO 20 I = 1,NSTEPS,INCX
- W = DX(I)
- Z = DY(I)
- DX(I) = W + Z*DH12
- DY(I) = W*DH21 + Z
- 20 CONTINUE
- GO TO 140
- 30 CONTINUE
- DH11 = DPARAM(2)
- DH22 = DPARAM(5)
- DO 40 I = 1,NSTEPS,INCX
- W = DX(I)
- Z = DY(I)
- DX(I) = W*DH11 + Z
- DY(I) = -W + DH22*Z
- 40 CONTINUE
- GO TO 140
- 50 CONTINUE
- DH11 = DPARAM(2)
- DH12 = DPARAM(4)
- DH21 = DPARAM(3)
- DH22 = DPARAM(5)
- DO 60 I = 1,NSTEPS,INCX
- W = DX(I)
- Z = DY(I)
- DX(I) = W*DH11 + Z*DH12
- DY(I) = W*DH21 + Z*DH22
- 60 CONTINUE
- GO TO 140
- 70 CONTINUE
- KX = 1
- KY = 1
- IF (INCX.LT.0) KX = 1 + (1-N)*INCX
- IF (INCY.LT.0) KY = 1 + (1-N)*INCY
-*
- IF (DFLAG.LT.ZERO) THEN
- GO TO 120
- ELSE IF (DFLAG.EQ.ZERO) THEN
- GO TO 80
- ELSE
- GO TO 100
- END IF
- 80 CONTINUE
- DH12 = DPARAM(4)
- DH21 = DPARAM(3)
- DO 90 I = 1,N
- W = DX(KX)
- Z = DY(KY)
- DX(KX) = W + Z*DH12
- DY(KY) = W*DH21 + Z
- KX = KX + INCX
- KY = KY + INCY
- 90 CONTINUE
- GO TO 140
- 100 CONTINUE
- DH11 = DPARAM(2)
- DH22 = DPARAM(5)
- DO 110 I = 1,N
- W = DX(KX)
- Z = DY(KY)
- DX(KX) = W*DH11 + Z
- DY(KY) = -W + DH22*Z
- KX = KX + INCX
- KY = KY + INCY
- 110 CONTINUE
- GO TO 140
- 120 CONTINUE
- DH11 = DPARAM(2)
- DH12 = DPARAM(4)
- DH21 = DPARAM(3)
- DH22 = DPARAM(5)
- DO 130 I = 1,N
- W = DX(KX)
- Z = DY(KY)
- DX(KX) = W*DH11 + Z*DH12
- DY(KY) = W*DH21 + Z*DH22
- KX = KX + INCX
- KY = KY + INCY
- 130 CONTINUE
- 140 CONTINUE
RETURN
END
*
* .. Local Scalars ..
DOUBLE PRECISION DFLAG,DH11,DH12,DH21,DH22,DP1,DP2,DQ1,DQ2,DTEMP,
- + DU,GAM,GAMSQ,ONE,RGAMSQ,TWO,ZERO
- INTEGER IGO
+ $ DU,GAM,GAMSQ,ONE,RGAMSQ,TWO,ZERO
* ..
* .. Intrinsic Functions ..
INTRINSIC DABS
DATA GAM,GAMSQ,RGAMSQ/4096.D0,16777216.D0,5.9604645D-8/
* ..
- IF (.NOT.DD1.LT.ZERO) GO TO 10
-* GO ZERO-H-D-AND-DX1..
- GO TO 60
- 10 CONTINUE
-* CASE-DD1-NONNEGATIVE
- DP2 = DD2*DY1
- IF (.NOT.DP2.EQ.ZERO) GO TO 20
- DFLAG = -TWO
- GO TO 260
- 20 CONTINUE
-* REGULAR-CASE..
- DP1 = DD1*DX1
- DQ2 = DP2*DY1
- DQ1 = DP1*DX1
-*
- IF (.NOT.DABS(DQ1).GT.DABS(DQ2)) GO TO 40
- DH21 = -DY1/DX1
- DH12 = DP2/DP1
-*
- DU = ONE - DH12*DH21
-*
- IF (.NOT.DU.LE.ZERO) GO TO 30
-* GO ZERO-H-D-AND-DX1..
- GO TO 60
- 30 CONTINUE
- DFLAG = ZERO
- DD1 = DD1/DU
- DD2 = DD2/DU
- DX1 = DX1*DU
-* GO SCALE-CHECK..
- GO TO 100
- 40 CONTINUE
- IF (.NOT.DQ2.LT.ZERO) GO TO 50
-* GO ZERO-H-D-AND-DX1..
- GO TO 60
- 50 CONTINUE
- DFLAG = ONE
- DH11 = DP1/DP2
- DH22 = DX1/DY1
- DU = ONE + DH11*DH22
- DTEMP = DD2/DU
- DD2 = DD1/DU
- DD1 = DTEMP
- DX1 = DY1*DU
-* GO SCALE-CHECK
- GO TO 100
- 60 CONTINUE
-* PROCEDURE..ZERO-H-D-AND-DX1..
- DFLAG = -ONE
- DH11 = ZERO
- DH12 = ZERO
- DH21 = ZERO
- DH22 = ZERO
-*
- DD1 = ZERO
- DD2 = ZERO
- DX1 = ZERO
-* RETURN..
- GO TO 220
- 70 CONTINUE
-* PROCEDURE..FIX-H..
- IF (.NOT.DFLAG.GE.ZERO) GO TO 90
-*
- IF (.NOT.DFLAG.EQ.ZERO) GO TO 80
- DH11 = ONE
- DH22 = ONE
- DFLAG = -ONE
- GO TO 90
- 80 CONTINUE
- DH21 = -ONE
- DH12 = ONE
- DFLAG = -ONE
- 90 CONTINUE
- GO TO (150,180,210) IGO
- GO TO 120
- 100 CONTINUE
+ IF (DD1.LT.ZERO) THEN
+* GO ZERO-H-D-AND-DX1..
+ DFLAG = -ONE
+ DH11 = ZERO
+ DH12 = ZERO
+ DH21 = ZERO
+ DH22 = ZERO
+*
+ DD1 = ZERO
+ DD2 = ZERO
+ DX1 = ZERO
+ ELSE
+* CASE-DD1-NONNEGATIVE
+ DP2 = DD2*DY1
+ IF (DP2.EQ.ZERO) THEN
+ DFLAG = -TWO
+ DPARAM(1) = DFLAG
+ RETURN
+ END IF
+* REGULAR-CASE..
+ DP1 = DD1*DX1
+ DQ2 = DP2*DY1
+ DQ1 = DP1*DX1
+*
+ IF (DABS(DQ1).GT.DABS(DQ2)) THEN
+ DH21 = -DY1/DX1
+ DH12 = DP2/DP1
+*
+ DU = ONE - DH12*DH21
+*
+ IF (DU.GT.ZERO) THEN
+ DFLAG = ZERO
+ DD1 = DD1/DU
+ DD2 = DD2/DU
+ DX1 = DX1*DU
+ END IF
+ ELSE
+
+ IF (DQ2.LT.ZERO) THEN
+* GO ZERO-H-D-AND-DX1..
+ DFLAG = -ONE
+ DH11 = ZERO
+ DH12 = ZERO
+ DH21 = ZERO
+ DH22 = ZERO
+*
+ DD1 = ZERO
+ DD2 = ZERO
+ DX1 = ZERO
+ ELSE
+ DFLAG = ONE
+ DH11 = DP1/DP2
+ DH22 = DX1/DY1
+ DU = ONE + DH11*DH22
+ DTEMP = DD2/DU
+ DD2 = DD1/DU
+ DD1 = DTEMP
+ DX1 = DY1*DU
+ END IF
+ END IF
+
* PROCEDURE..SCALE-CHECK
- 110 CONTINUE
- IF (.NOT.DD1.LE.RGAMSQ) GO TO 130
- IF (DD1.EQ.ZERO) GO TO 160
- IGO = 0
-* FIX-H..
- GO TO 70
- 120 CONTINUE
- DD1 = DD1*GAM**2
- DX1 = DX1/GAM
- DH11 = DH11/GAM
- DH12 = DH12/GAM
- GO TO 110
- 130 CONTINUE
- 140 CONTINUE
- IF (.NOT.DD1.GE.GAMSQ) GO TO 160
- IGO = 1
-* FIX-H..
- GO TO 70
- 150 CONTINUE
- DD1 = DD1/GAM**2
- DX1 = DX1*GAM
- DH11 = DH11*GAM
- DH12 = DH12*GAM
- GO TO 140
- 160 CONTINUE
- 170 CONTINUE
- IF (.NOT.DABS(DD2).LE.RGAMSQ) GO TO 190
- IF (DD2.EQ.ZERO) GO TO 220
- IGO = 2
-* FIX-H..
- GO TO 70
- 180 CONTINUE
- DD2 = DD2*GAM**2
- DH21 = DH21/GAM
- DH22 = DH22/GAM
- GO TO 170
- 190 CONTINUE
- 200 CONTINUE
- IF (.NOT.DABS(DD2).GE.GAMSQ) GO TO 220
- IGO = 3
-* FIX-H..
- GO TO 70
- 210 CONTINUE
- DD2 = DD2/GAM**2
- DH21 = DH21*GAM
- DH22 = DH22*GAM
- GO TO 200
- 220 CONTINUE
+ IF (DD1.NE.ZERO) THEN
+ DO WHILE ((DD1.LE.RGAMSQ) .OR. (DD1.GE.GAMSQ))
+ IF (DFLAG.EQ.ZERO) THEN
+ DH11 = ONE
+ DH22 = ONE
+ DFLAG = -ONE
+ ELSE
+ DH21 = -ONE
+ DH12 = ONE
+ DFLAG = -ONE
+ END IF
+ IF (DD1.LE.RGAMSQ) THEN
+ DD1 = DD1*GAM**2
+ DX1 = DX1/GAM
+ DH11 = DH11/GAM
+ DH12 = DH12/GAM
+ ELSE
+ DD1 = DD1/GAM**2
+ DX1 = DX1*GAM
+ DH11 = DH11*GAM
+ DH12 = DH12*GAM
+ END IF
+ ENDDO
+ END IF
+
+ IF (DD2.NE.ZERO) THEN
+ DO WHILE ( (DABS(DD2).LE.RGAMSQ) .OR. (DABS(DD2).GE.GAMSQ) )
+ IF (DFLAG.EQ.ZERO) THEN
+ DH11 = ONE
+ DH22 = ONE
+ DFLAG = -ONE
+ ELSE
+ DH21 = -ONE
+ DH12 = ONE
+ DFLAG = -ONE
+ END IF
+ IF (DABS(DD2).LE.RGAMSQ) THEN
+ DD2 = DD2*GAM**2
+ DH21 = DH21/GAM
+ DH22 = DH22/GAM
+ ELSE
+ DD2 = DD2/GAM**2
+ DH21 = DH21*GAM
+ DH22 = DH22*GAM
+ END IF
+ END DO
+ END IF
+
+ END IF
+
IF (DFLAG.LT.ZERO) THEN
- GO TO 250
+ DPARAM(2) = DH11
+ DPARAM(3) = DH21
+ DPARAM(4) = DH12
+ DPARAM(5) = DH22
ELSE IF (DFLAG.EQ.ZERO) THEN
- GO TO 230
+ DPARAM(3) = DH21
+ DPARAM(4) = DH12
ELSE
- GO TO 240
+ DPARAM(2) = DH11
+ DPARAM(5) = DH22
END IF
- 230 CONTINUE
- DPARAM(3) = DH21
- DPARAM(4) = DH12
- GO TO 260
- 240 CONTINUE
- DPARAM(2) = DH11
- DPARAM(5) = DH22
- GO TO 260
- 250 CONTINUE
- DPARAM(2) = DH11
- DPARAM(3) = DH21
- DPARAM(4) = DH12
- DPARAM(5) = DH22
+
260 CONTINUE
DPARAM(1) = DFLAG
RETURN
END
+
+
+
+
* APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
*
* (SX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF SX ARE IN
-* (DX**T)
+* (SX**T)
*
* SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
* LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY.
* ..
*
SFLAG = SPARAM(1)
- IF (N.LE.0 .OR. (SFLAG+TWO.EQ.ZERO)) GO TO 140
- IF (.NOT. (INCX.EQ.INCY.AND.INCX.GT.0)) GO TO 70
-*
- NSTEPS = N*INCX
- IF (SFLAG.LT.ZERO) THEN
- GO TO 50
- ELSE IF (SFLAG.EQ.ZERO) THEN
- GO TO 10
+ IF (N.LE.0 .OR. (SFLAG+TWO.EQ.ZERO)) RETURN
+ IF (INCX.EQ.INCY.AND.INCX.GT.0) THEN
+*
+ NSTEPS = N*INCX
+ IF (SFLAG.LT.ZERO) THEN
+ SH11 = SPARAM(2)
+ SH12 = SPARAM(4)
+ SH21 = SPARAM(3)
+ SH22 = SPARAM(5)
+ DO I = 1,NSTEPS,INCX
+ W = SX(I)
+ Z = SY(I)
+ SX(I) = W*SH11 + Z*SH12
+ SY(I) = W*SH21 + Z*SH22
+ END DO
+ ELSE IF (SFLAG.EQ.ZERO) THEN
+ SH12 = SPARAM(4)
+ SH21 = SPARAM(3)
+ DO I = 1,NSTEPS,INCX
+ W = SX(I)
+ Z = SY(I)
+ SX(I) = W + Z*SH12
+ SY(I) = W*SH21 + Z
+ END DO
+ ELSE
+ SH11 = SPARAM(2)
+ SH22 = SPARAM(5)
+ DO I = 1,NSTEPS,INCX
+ W = SX(I)
+ Z = SY(I)
+ SX(I) = W*SH11 + Z
+ SY(I) = -W + SH22*Z
+ END DO
+ END IF
ELSE
- GO TO 30
+ KX = 1
+ KY = 1
+ IF (INCX.LT.0) KX = 1 + (1-N)*INCX
+ IF (INCY.LT.0) KY = 1 + (1-N)*INCY
+*
+ IF (SFLAG.LT.ZERO) THEN
+ SH11 = SPARAM(2)
+ SH12 = SPARAM(4)
+ SH21 = SPARAM(3)
+ SH22 = SPARAM(5)
+ DO I = 1,N
+ W = SX(KX)
+ Z = SY(KY)
+ SX(KX) = W*SH11 + Z*SH12
+ SY(KY) = W*SH21 + Z*SH22
+ KX = KX + INCX
+ KY = KY + INCY
+ END DO
+ ELSE IF (SFLAG.EQ.ZERO) THEN
+ SH12 = SPARAM(4)
+ SH21 = SPARAM(3)
+ DO I = 1,N
+ W = SX(KX)
+ Z = SY(KY)
+ SX(KX) = W + Z*SH12
+ SY(KY) = W*SH21 + Z
+ KX = KX + INCX
+ KY = KY + INCY
+ END DO
+ ELSE
+ SH11 = SPARAM(2)
+ SH22 = SPARAM(5)
+ DO I = 1,N
+ W = SX(KX)
+ Z = SY(KY)
+ SX(KX) = W*SH11 + Z
+ SY(KY) = -W + SH22*Z
+ KX = KX + INCX
+ KY = KY + INCY
+ END DO
+ END IF
END IF
- 10 CONTINUE
- SH12 = SPARAM(4)
- SH21 = SPARAM(3)
- DO 20 I = 1,NSTEPS,INCX
- W = SX(I)
- Z = SY(I)
- SX(I) = W + Z*SH12
- SY(I) = W*SH21 + Z
- 20 CONTINUE
- GO TO 140
- 30 CONTINUE
- SH11 = SPARAM(2)
- SH22 = SPARAM(5)
- DO 40 I = 1,NSTEPS,INCX
- W = SX(I)
- Z = SY(I)
- SX(I) = W*SH11 + Z
- SY(I) = -W + SH22*Z
- 40 CONTINUE
- GO TO 140
- 50 CONTINUE
- SH11 = SPARAM(2)
- SH12 = SPARAM(4)
- SH21 = SPARAM(3)
- SH22 = SPARAM(5)
- DO 60 I = 1,NSTEPS,INCX
- W = SX(I)
- Z = SY(I)
- SX(I) = W*SH11 + Z*SH12
- SY(I) = W*SH21 + Z*SH22
- 60 CONTINUE
- GO TO 140
- 70 CONTINUE
- KX = 1
- KY = 1
- IF (INCX.LT.0) KX = 1 + (1-N)*INCX
- IF (INCY.LT.0) KY = 1 + (1-N)*INCY
-*
- IF (SFLAG.LT.ZERO) THEN
- GO TO 120
- ELSE IF (SFLAG.EQ.ZERO) THEN
- GO TO 80
- ELSE
- GO TO 100
- END IF
- 80 CONTINUE
- SH12 = SPARAM(4)
- SH21 = SPARAM(3)
- DO 90 I = 1,N
- W = SX(KX)
- Z = SY(KY)
- SX(KX) = W + Z*SH12
- SY(KY) = W*SH21 + Z
- KX = KX + INCX
- KY = KY + INCY
- 90 CONTINUE
- GO TO 140
- 100 CONTINUE
- SH11 = SPARAM(2)
- SH22 = SPARAM(5)
- DO 110 I = 1,N
- W = SX(KX)
- Z = SY(KY)
- SX(KX) = W*SH11 + Z
- SY(KY) = -W + SH22*Z
- KX = KX + INCX
- KY = KY + INCY
- 110 CONTINUE
- GO TO 140
- 120 CONTINUE
- SH11 = SPARAM(2)
- SH12 = SPARAM(4)
- SH21 = SPARAM(3)
- SH22 = SPARAM(5)
- DO 130 I = 1,N
- W = SX(KX)
- Z = SY(KY)
- SX(KX) = W*SH11 + Z*SH12
- SY(KY) = W*SH21 + Z*SH22
- KX = KX + INCX
- KY = KY + INCY
- 130 CONTINUE
- 140 CONTINUE
RETURN
END
*
* .. Local Scalars ..
REAL GAM,GAMSQ,ONE,RGAMSQ,SFLAG,SH11,SH12,SH21,SH22,SP1,SP2,SQ1,
- + SQ2,STEMP,SU,TWO,ZERO
- INTEGER IGO
+ $ SQ2,STEMP,SU,TWO,ZERO
* ..
* .. Intrinsic Functions ..
INTRINSIC ABS
DATA GAM,GAMSQ,RGAMSQ/4096.E0,1.67772E7,5.96046E-8/
* ..
- IF (.NOT.SD1.LT.ZERO) GO TO 10
-* GO ZERO-H-D-AND-SX1..
- GO TO 60
- 10 CONTINUE
-* CASE-SD1-NONNEGATIVE
- SP2 = SD2*SY1
- IF (.NOT.SP2.EQ.ZERO) GO TO 20
- SFLAG = -TWO
- GO TO 260
- 20 CONTINUE
-* REGULAR-CASE..
- SP1 = SD1*SX1
- SQ2 = SP2*SY1
- SQ1 = SP1*SX1
-*
- IF (.NOT.ABS(SQ1).GT.ABS(SQ2)) GO TO 40
- SH21 = -SY1/SX1
- SH12 = SP2/SP1
-*
- SU = ONE - SH12*SH21
-*
- IF (.NOT.SU.LE.ZERO) GO TO 30
-* GO ZERO-H-D-AND-SX1..
- GO TO 60
- 30 CONTINUE
- SFLAG = ZERO
- SD1 = SD1/SU
- SD2 = SD2/SU
- SX1 = SX1*SU
-* GO SCALE-CHECK..
- GO TO 100
- 40 CONTINUE
- IF (.NOT.SQ2.LT.ZERO) GO TO 50
-* GO ZERO-H-D-AND-SX1..
- GO TO 60
- 50 CONTINUE
- SFLAG = ONE
- SH11 = SP1/SP2
- SH22 = SX1/SY1
- SU = ONE + SH11*SH22
- STEMP = SD2/SU
- SD2 = SD1/SU
- SD1 = STEMP
- SX1 = SY1*SU
-* GO SCALE-CHECK
- GO TO 100
- 60 CONTINUE
-* PROCEDURE..ZERO-H-D-AND-SX1..
- SFLAG = -ONE
- SH11 = ZERO
- SH12 = ZERO
- SH21 = ZERO
- SH22 = ZERO
-*
- SD1 = ZERO
- SD2 = ZERO
- SX1 = ZERO
-* RETURN..
- GO TO 220
- 70 CONTINUE
-* PROCEDURE..FIX-H..
- IF (.NOT.SFLAG.GE.ZERO) GO TO 90
-*
- IF (.NOT.SFLAG.EQ.ZERO) GO TO 80
- SH11 = ONE
- SH22 = ONE
- SFLAG = -ONE
- GO TO 90
- 80 CONTINUE
- SH21 = -ONE
- SH12 = ONE
- SFLAG = -ONE
- 90 CONTINUE
- GO TO (150,180,210) IGO
- GO TO 120
- 100 CONTINUE
-* PROCEDURE..SCALE-CHECK
- 110 CONTINUE
- IF (.NOT.SD1.LE.RGAMSQ) GO TO 130
- IF (SD1.EQ.ZERO) GO TO 160
- IGO = 0
-* FIX-H..
- GO TO 70
- 120 CONTINUE
- SD1 = SD1*GAM**2
- SX1 = SX1/GAM
- SH11 = SH11/GAM
- SH12 = SH12/GAM
- GO TO 110
- 130 CONTINUE
- 140 CONTINUE
- IF (.NOT.SD1.GE.GAMSQ) GO TO 160
- IGO = 1
-* FIX-H..
- GO TO 70
- 150 CONTINUE
- SD1 = SD1/GAM**2
- SX1 = SX1*GAM
- SH11 = SH11*GAM
- SH12 = SH12*GAM
- GO TO 140
- 160 CONTINUE
- 170 CONTINUE
- IF (.NOT.ABS(SD2).LE.RGAMSQ) GO TO 190
- IF (SD2.EQ.ZERO) GO TO 220
- IGO = 2
-* FIX-H..
- GO TO 70
- 180 CONTINUE
- SD2 = SD2*GAM**2
- SH21 = SH21/GAM
- SH22 = SH22/GAM
- GO TO 170
- 190 CONTINUE
- 200 CONTINUE
- IF (.NOT.ABS(SD2).GE.GAMSQ) GO TO 220
- IGO = 3
-* FIX-H..
- GO TO 70
- 210 CONTINUE
- SD2 = SD2/GAM**2
- SH21 = SH21*GAM
- SH22 = SH22*GAM
- GO TO 200
- 220 CONTINUE
+ IF (SD1.LT.ZERO) THEN
+* GO ZERO-H-D-AND-SX1..
+ SFLAG = -ONE
+ SH11 = ZERO
+ SH12 = ZERO
+ SH21 = ZERO
+ SH22 = ZERO
+*
+ SD1 = ZERO
+ SD2 = ZERO
+ SX1 = ZERO
+ ELSE
+* CASE-SD1-NONNEGATIVE
+ SP2 = SD2*SY1
+ IF (SP2.EQ.ZERO) THEN
+ SFLAG = -TWO
+ SPARAM(1) = SFLAG
+ RETURN
+ END IF
+* REGULAR-CASE..
+ SP1 = SD1*SX1
+ SQ2 = SP2*SY1
+ SQ1 = SP1*SX1
+*
+ IF (ABS(SQ1).GT.ABS(SQ2)) THEN
+ SH21 = -SY1/SX1
+ SH12 = SP2/SP1
+*
+ SU = ONE - SH12*SH21
+*
+ IF (SU.GT.ZERO) THEN
+ SFLAG = ZERO
+ SD1 = SD1/SU
+ SD2 = SD2/SU
+ SX1 = SX1*SU
+ END IF
+ ELSE
+
+ IF (SQ2.LT.ZERO) THEN
+* GO ZERO-H-D-AND-SX1..
+ SFLAG = -ONE
+ SH11 = ZERO
+ SH12 = ZERO
+ SH21 = ZERO
+ SH22 = ZERO
+*
+ SD1 = ZERO
+ SD2 = ZERO
+ SX1 = ZERO
+ ELSE
+ SFLAG = ONE
+ SH11 = SP1/SP2
+ SH22 = SX1/SY1
+ SU = ONE + SH11*SH22
+ STEMP = SD2/SU
+ SD2 = SD1/SU
+ SD1 = STEMP
+ SX1 = SY1*SU
+ END IF
+ END IF
+
+* PROCESURE..SCALE-CHECK
+ IF (SD1.NE.ZERO) THEN
+ DO WHILE ((SD1.LE.RGAMSQ) .OR. (SD1.GE.GAMSQ))
+ IF (SFLAG.EQ.ZERO) THEN
+ SH11 = ONE
+ SH22 = ONE
+ SFLAG = -ONE
+ ELSE
+ SH21 = -ONE
+ SH12 = ONE
+ SFLAG = -ONE
+ END IF
+ IF (SD1.LE.RGAMSQ) THEN
+ SD1 = SD1*GAM**2
+ SX1 = SX1/GAM
+ SH11 = SH11/GAM
+ SH12 = SH12/GAM
+ ELSE
+ SD1 = SD1/GAM**2
+ SX1 = SX1*GAM
+ SH11 = SH11*GAM
+ SH12 = SH12*GAM
+ END IF
+ ENDDO
+ END IF
+
+ IF (SD2.NE.ZERO) THEN
+ DO WHILE ( (ABS(SD2).LE.RGAMSQ) .OR. (ABS(SD2).GE.GAMSQ) )
+ IF (SFLAG.EQ.ZERO) THEN
+ SH11 = ONE
+ SH22 = ONE
+ SFLAG = -ONE
+ ELSE
+ SH21 = -ONE
+ SH12 = ONE
+ SFLAG = -ONE
+ END IF
+ IF (ABS(SD2).LE.RGAMSQ) THEN
+ SD2 = SD2*GAM**2
+ SH21 = SH21/GAM
+ SH22 = SH22/GAM
+ ELSE
+ SD2 = SD2/GAM**2
+ SH21 = SH21*GAM
+ SH22 = SH22*GAM
+ END IF
+ END DO
+ END IF
+
+ END IF
+
IF (SFLAG.LT.ZERO) THEN
- GO TO 250
+ SPARAM(2) = SH11
+ SPARAM(3) = SH21
+ SPARAM(4) = SH12
+ SPARAM(5) = SH22
ELSE IF (SFLAG.EQ.ZERO) THEN
- GO TO 230
- ELSE
- GO TO 240
+ SPARAM(3) = SH21
+ SPARAM(4) = SH12
+ ELSE
+ SPARAM(2) = SH11
+ SPARAM(5) = SH22
END IF
- 230 CONTINUE
- SPARAM(3) = SH21
- SPARAM(4) = SH12
- GO TO 260
- 240 CONTINUE
- SPARAM(2) = SH11
- SPARAM(5) = SH22
- GO TO 260
- 250 CONTINUE
- SPARAM(2) = SH11
- SPARAM(3) = SH21
- SPARAM(4) = SH12
- SPARAM(5) = SH22
+
260 CONTINUE
SPARAM(1) = SFLAG
RETURN
END
+
+
+
+
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SFAC
* .. External Subroutines ..
EXTERNAL CHECK0, CHECK1, CHECK2, CHECK3, HEADER
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA SFAC/9.765625D-4/
* .. Executable Statements ..
WRITE (NOUT,99999)
- DO 20 IC = 1, 10
+ DO 20 IC = 1, 13
ICASE = IC
CALL HEADER
*
-* .. Initialize PASS, INCX, INCY, and MODE for a new case. ..
-* .. the value 9999 for INCX, INCY or MODE will appear in the ..
+* .. Initialize PASS, INCX, and INCY for a new case. ..
+* .. the value 9999 for INCX or INCY will appear in the ..
* .. detailed output, if any, for cases that do not involve ..
* .. these parameters ..
*
PASS = .TRUE.
INCX = 9999
INCY = 9999
- MODE = 9999
- IF (ICASE.EQ.3) THEN
+ IF (ICASE.EQ.3 .OR. ICASE.EQ.11) THEN
CALL CHECK0(SFAC)
ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.
+ ICASE.EQ.10) THEN
CALL CHECK1(SFAC)
ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.
- + ICASE.EQ.6) THEN
+ + ICASE.EQ.6 .OR. ICASE.EQ.12 .OR. ICASE.EQ.13) THEN
CALL CHECK2(SFAC)
ELSE IF (ICASE.EQ.4) THEN
CALL CHECK3(SFAC)
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Arrays ..
- CHARACTER*6 L(10)
+ CHARACTER*6 L(13)
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA L(1)/' DDOT '/
DATA L(2)/'DAXPY '/
DATA L(8)/'DASUM '/
DATA L(9)/'DSCAL '/
DATA L(10)/'IDAMAX'/
+ DATA L(11)/'DROTMG'/
+ DATA L(12)/'DROTM '/
+ DATA L(13)/'DSDOT '/
* .. Executable Statements ..
WRITE (NOUT,99999) ICASE, L(ICASE)
RETURN
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
- DOUBLE PRECISION SA, SB, SC, SS
- INTEGER K
+ DOUBLE PRECISION SA, SB, SC, SS, D12
+ INTEGER I, K
* .. Local Arrays ..
DOUBLE PRECISION DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
- + DS1(8)
+ $ DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)
* .. External Subroutines ..
- EXTERNAL DROTG, STEST1
+ EXTERNAL DROTG, DROTMG, STEST1
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INC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.5D0, -.25D0, 0.D0/
+* 4096 = 2 ** 12
+ DATA D12 /4096.D0/
+ DTRUE(1,1) = 12.D0 / 130.D0
+ DTRUE(2,1) = 36.D0 / 130.D0
+ DTRUE(7,1) = -1.D0 / 6.D0
+ DTRUE(1,2) = 14.D0 / 75.D0
+ DTRUE(2,2) = 49.D0 / 75.D0
+ DTRUE(9,2) = 1.D0 / 7.D0
+ DTRUE(1,5) = 45.D-11 * (D12 * D12)
+ DTRUE(3,5) = 4.D5 / (3.D0 * D12)
+ DTRUE(6,5) = 1.D0 / D12
+ DTRUE(8,5) = 1.D4 / (3.D0 * D12)
+ DTRUE(1,6) = 4.D10 / (1.5D0 * D12 * D12)
+ DTRUE(2,6) = 2.D-2 / 1.5D0
+ DTRUE(8,6) = 5.D-7 * D12
+ DTRUE(1,7) = 4.D0 / 150.D0
+ DTRUE(2,7) = (2.D-10 / 1.5D0) * (D12 * D12)
+ DTRUE(7,7) = -DTRUE(6,5)
+ DTRUE(9,7) = 1.D4 / D12
+ DTRUE(1,8) = DTRUE(1,7)
+ DTRUE(2,8) = 2.D10 / (1.5D0 * D12 * D12)
+ DTRUE(1,9) = 32.D0 / 7.D0
+ DTRUE(2,9) = -16.D0 / 7.D0
* .. Executable Statements ..
*
* Compute true values which cannot be prestored
CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)
CALL STEST1(SC,DC1(K),DC1(K),SFAC)
CALL STEST1(SS,DS1(K),DS1(K),SFAC)
+ ELSEIF (ICASE.EQ.11) THEN
+* .. DROTMG ..
+ DO I=1,4
+ DTEMP(I)= DAB(I,K)
+ DTEMP(I+4) = 0.0
+ END DO
+ DTEMP(9) = 0.0
+ CALL DROTMG(DTEMP(1),DTEMP(2),DTEMP(3),DTEMP(4),DTEMP(5))
+ CALL STEST(9,DTEMP,DTRUE(1,K),DTRUE(1,K),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
STOP
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER I, LEN, NP1
* .. Intrinsic Functions ..
INTRINSIC MAX
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA SA/0.3D0, -1.0D0, 0.0D0, 1.0D0, 0.3D0, 0.3D0,
+ 0.3D0, 0.3D0, 0.3D0, 0.3D0/
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SA
- INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
+ INTEGER I, J, KI, KN, KNI, KPAR, KSIZE, LENX, LENY,
+ $ MX, MY
* .. Local Arrays ..
DOUBLE PRECISION DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),
- + DT8(7,4,4), DX1(7),
- + DY1(7), SSIZE1(4), SSIZE2(14,2), STX(7), STY(7),
- + SX(7), SY(7)
+ $ DT8(7,4,4), DX1(7),
+ $ DY1(7), SSIZE1(4), SSIZE2(14,2), SSIZE(7),
+ $ STX(7), STY(7), SX(7), SY(7),
+ $ DPAR(5,4), DT19X(7,4,16),DT19XA(7,4,4),
+ $ DT19XB(7,4,4), DT19XC(7,4,4),DT19XD(7,4,4),
+ $ DT19Y(7,4,16), DT19YA(7,4,4),DT19YB(7,4,4),
+ $ DT19YC(7,4,4), DT19YD(7,4,4), DTEMP(5)
INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
* .. External Functions ..
- DOUBLE PRECISION DDOT
- EXTERNAL DDOT
+ DOUBLE PRECISION DDOT, DSDOT
+ EXTERNAL DDOT, DSDOT
* .. External Subroutines ..
- EXTERNAL DAXPY, DCOPY, DSWAP, STEST, STEST1
+ EXTERNAL DAXPY, DCOPY, DROTM, DSWAP, STEST, STEST1
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
+ EQUIVALENCE (DT19X(1,1,1),DT19XA(1,1,1)),(DT19X(1,1,5),
+ A DT19XB(1,1,1)),(DT19X(1,1,9),DT19XC(1,1,1)),
+ B (DT19X(1,1,13),DT19XD(1,1,1))
+ EQUIVALENCE (DT19Y(1,1,1),DT19YA(1,1,1)),(DT19Y(1,1,5),
+ A DT19YB(1,1,1)),(DT19Y(1,1,9),DT19YC(1,1,1)),
+ B (DT19Y(1,1,13),DT19YD(1,1,1))
+
DATA SA/0.3D0/
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
+ 0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
+ 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,
+ 1.17D0, 1.17D0, 1.17D0/
+*
+* FOR DROTM
+*
+ DATA DPAR/-2.D0, 0.D0,0.D0,0.D0,0.D0,
+ A -1.D0, 2.D0, -3.D0, -4.D0, 5.D0,
+ B 0.D0, 0.D0, 2.D0, -3.D0, 0.D0,
+ C 1.D0, 5.D0, 2.D0, 0.D0, -4.D0/
+* TRUE X RESULTS F0R ROTATIONS DROTM
+ DATA DT19XA/.6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
+ A .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
+ B .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
+ C .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
+ D .6D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
+ E -.8D0, 0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,
+ F -.9D0, 0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, .8D0,
+ M .7D0, -.9D0, 1.2D0, .7D0, -1.5D0, .2D0, 1.6D0,
+ N 1.7D0, -.9D0, .5D0, .7D0, -1.6D0, .2D0, 2.4D0,
+ O -2.6D0, -.9D0, -1.3D0, .7D0, 2.9D0, .2D0, -4.0D0 /
+*
* .. Executable Statements ..
*
DO 120 KI = 1, 4
80 CONTINUE
CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0D0)
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)
+ ELSE IF (ICASE.EQ.12) THEN
+* .. DROTM ..
+ KNI=KN+4*(KI-1)
+ DO KPAR=1,4
+ DO I=1,7
+ SX(I) = DX1(I)
+ SY(I) = DY1(I)
+ STX(I)= DT19X(I,KPAR,KNI)
+ STY(I)= DT19Y(I,KPAR,KNI)
+ END DO
+*
+ DO I=1,5
+ DTEMP(I) = DPAR(I,KPAR)
+ END DO
+*
+ DO I=1,LENX
+ SSIZE(I)=STX(I)
+ END DO
+* SEE REMARK ABOVE ABOUT DT11X(1,2,7)
+* AND DT11X(5,3,8).
+ IF ((KPAR .EQ. 2) .AND. (KNI .EQ. 7))
+ $ SSIZE(1) = 2.4D0
+ IF ((KPAR .EQ. 3) .AND. (KNI .EQ. 8))
+ $ SSIZE(5) = 1.8D0
+*
+ CALL DROTM(N,SX,INCX,SY,INCY,DTEMP)
+ CALL STEST(LENX,SX,STX,SSIZE,SFAC)
+ CALL STEST(LENY,SY,STY,STY,SFAC)
+ END DO
+ ELSE IF (ICASE.EQ.13) THEN
+* .. DSDOT ..
+ CALL TESTDSDOT(SNGL(DSDOT(N,SNGL(SX),INCX,SNGL(SY),INCY)),
+ $ SNGL(DT7(KN,KI)),SNGL(SSIZE1(KN)), .3125E-1)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
* .. Scalar Arguments ..
DOUBLE PRECISION SFAC
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SC, SS
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
* .. Array Arguments ..
DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
DOUBLE PRECISION SD
* .. Intrinsic Functions ..
INTRINSIC ABS
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Executable Statements ..
*
DO 40 I = 1, LEN
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
- 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),
+ 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, I, SCOMP(I),
+ STRUE(I), SD, SSIZE(I)
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
-99998 FORMAT (/' CASE N INCX INCY MODE I ',
+99998 FORMAT (/' CASE N INCX INCY I ',
+ + ' COMP(I) TRUE(I) DIFFERENCE',
+ + ' SIZE(I)',/1X)
+99997 FORMAT (1X,I4,I3,2I5,I3,2D36.8,2D12.4)
+ END
+ SUBROUTINE TESTDSDOT(SCOMP,STRUE,SSIZE,SFAC)
+* ********************************* STEST **************************
+*
+* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
+* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
+* NEGLIGIBLE.
+*
+* C. L. LAWSON, JPL, 1974 DEC 10
+*
+* .. Parameters ..
+ INTEGER NOUT
+ PARAMETER (NOUT=6)
+* .. Scalar Arguments ..
+ REAL SFAC, SCOMP, SSIZE, STRUE
+* .. Scalars in Common ..
+ INTEGER ICASE, INCX, INCY, N
+ LOGICAL PASS
+* .. Local Scalars ..
+ REAL SD
+* .. Intrinsic Functions ..
+ INTRINSIC ABS
+* .. Common blocks ..
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
+* .. Executable Statements ..
+*
+ SD = SCOMP - STRUE
+ IF ((ABS(SSIZE)+ABS(SFAC*SD)-ABS(SSIZE)).EQ.0.0E0)
+ + GO TO 40
+*
+* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
+*
+ IF ( .NOT. PASS) GO TO 20
+* PRINT FAIL MESSAGE AND HEADER.
+ PASS = .FALSE.
+ WRITE (NOUT,99999)
+ WRITE (NOUT,99998)
+ 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, SCOMP,
+ + STRUE, SD, SSIZE
+ 40 CONTINUE
+ RETURN
+*
+99999 FORMAT (' FAIL')
+99998 FORMAT (/' CASE N INCX INCY ',
+ ' COMP(I) TRUE(I) DIFFERENCE',
+ ' SIZE(I)',/1X)
-99997 FORMAT (1X,I4,I3,3I5,I3,2D36.8,2D12.4)
+99997 FORMAT (1X,I4,I3,1I5,I3,2E36.8,2E12.4)
END
SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
* ************************* STEST1 *****************************
* .. Scalar Arguments ..
INTEGER ICOMP, ITRUE
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER ID
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Executable Statements ..
*
IF (ICOMP.EQ.ITRUE) GO TO 40
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 ID = ICOMP - ITRUE
- WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID
+ WRITE (NOUT,99997) ICASE, N, INCX, INCY, ICOMP, ITRUE, ID
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
-99998 FORMAT (/' CASE N INCX INCY MODE ',
+99998 FORMAT (/' CASE N INCX INCY ',
+ ' COMP TRUE DIFFERENCE',
+ /1X)
-99997 FORMAT (1X,I4,I3,3I5,2I36,I12)
+99997 FORMAT (1X,I4,I3,2I5,2I36,I12)
END
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
REAL SFAC
* .. External Subroutines ..
EXTERNAL CHECK0, CHECK1, CHECK2, CHECK3, HEADER
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA SFAC/9.765625E-4/
* .. Executable Statements ..
WRITE (NOUT,99999)
- DO 20 IC = 1, 10
+ DO 20 IC = 1, 13
ICASE = IC
CALL HEADER
*
-* .. Initialize PASS, INCX, INCY, and MODE for a new case. ..
-* .. the value 9999 for INCX, INCY or MODE will appear in the ..
+* .. Initialize PASS, INCX, and INCY for a new case. ..
+* .. the value 9999 for INCX or INCY will appear in the ..
* .. detailed output, if any, for cases that do not involve ..
* .. these parameters ..
*
PASS = .TRUE.
INCX = 9999
INCY = 9999
- MODE = 9999
- IF (ICASE.EQ.3) THEN
+ IF (ICASE.EQ.3 .OR. ICASE.EQ.11) THEN
CALL CHECK0(SFAC)
ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.
+ ICASE.EQ.10) THEN
CALL CHECK1(SFAC)
ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.
- + ICASE.EQ.6) THEN
+ + ICASE.EQ.6 .OR. ICASE.EQ.12 .OR. ICASE.EQ.13) THEN
CALL CHECK2(SFAC)
ELSE IF (ICASE.EQ.4) THEN
CALL CHECK3(SFAC)
INTEGER NOUT
PARAMETER (NOUT=6)
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Arrays ..
- CHARACTER*6 L(10)
+ CHARACTER*6 L(13)
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA L(1)/' SDOT '/
DATA L(2)/'SAXPY '/
DATA L(8)/'SASUM '/
DATA L(9)/'SSCAL '/
DATA L(10)/'ISAMAX'/
+ DATA L(11)/'SROTMG'/
+ DATA L(12)/'SROTM '/
+ DATA L(13)/'SDSDOT'/
* .. Executable Statements ..
WRITE (NOUT,99999) ICASE, L(ICASE)
RETURN
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
REAL D12, SA, SB, SC, SS
- INTEGER K
+ INTEGER I, K
* .. Local Arrays ..
REAL DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
- + DS1(8)
+ + DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)
* .. External Subroutines ..
- EXTERNAL SROTG, STEST1
+ EXTERNAL SROTG, SROTMG, STEST1
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA DA1/0.3E0, 0.4E0, -0.3E0, -0.4E0, -0.3E0, 0.0E0,
+ 0.0E0, 1.0E0/
+ 0.0E0, 1.0E0, 1.0E0/
DATA DBTRUE/0.0E0, 0.6E0, 0.0E0, -0.6E0, 0.0E0,
+ 0.0E0, 1.0E0, 0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+ DTRUE(1,5) = 45.E-11 * (D12 * D12)
+ DTRUE(3,5) = 4.E5 / (3.E0 * D12)
+ DTRUE(6,5) = 1.E0 / D12
+ DTRUE(8,5) = 1.E4 / (3.E0 * D12)
+ DTRUE(1,6) = 4.E10 / (1.5E0 * D12 * D12)
+ DTRUE(2,6) = 2.E-2 / 1.5E0
+ DTRUE(8,6) = 5.E-7 * D12
+ DTRUE(1,7) = 4.E0 / 150.E0
+ DTRUE(2,7) = (2.E-10 / 1.5E0) * (D12 * D12)
+ DTRUE(7,7) = -DTRUE(6,5)
+ DTRUE(9,7) = 1.E4 / D12
+ DTRUE(1,8) = DTRUE(1,7)
+ DTRUE(2,8) = 2.E10 / (1.5E0 * D12 * D12)
+ DTRUE(1,9) = 32.E0 / 7.E0
+ DTRUE(2,9) = -16.E0 / 7.E0
* .. Executable Statements ..
*
* Compute true values which cannot be prestored
CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)
CALL STEST1(SC,DC1(K),DC1(K),SFAC)
CALL STEST1(SS,DS1(K),DS1(K),SFAC)
+ ELSEIF (ICASE.EQ.11) THEN
+* .. SROTMG ..
+ DO I=1,4
+ DTEMP(I)= DAB(I,K)
+ DTEMP(I+4) = 0.0
+ END DO
+ DTEMP(9) = 0.0
+ CALL SROTMG(DTEMP(1),DTEMP(2),DTEMP(3),DTEMP(4),DTEMP(5))
+ CALL STEST(9,DTEMP,DTRUE(1,K),DTRUE(1,K),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'
STOP
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER I, LEN, NP1
* .. Intrinsic Functions ..
INTRINSIC MAX
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA SA/0.3E0, -1.0E0, 0.0E0, 1.0E0, 0.3E0, 0.3E0,
+ 0.3E0, 0.3E0, 0.3E0, 0.3E0/
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
REAL SA
- INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
+ INTEGER I, J, KI, KN, KNI, KPAR, KSIZE, LENX, LENY,
+ $ MX, MY
* .. Local Arrays ..
REAL DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),
- + DT8(7,4,4), DX1(7),
- + DY1(7), SSIZE1(4), SSIZE2(14,2), STX(7), STY(7),
- + SX(7), SY(7)
+ $ DT8(7,4,4), DX1(7),
+ $ DY1(7), SSIZE1(4), SSIZE2(14,2), SSIZE3(4),
+ $ SSIZE(7), STX(7), STY(7), SX(7), SY(7),
+ $ DPAR(5,4), DT19X(7,4,16),DT19XA(7,4,4),
+ $ DT19XB(7,4,4), DT19XC(7,4,4),DT19XD(7,4,4),
+ $ DT19Y(7,4,16), DT19YA(7,4,4),DT19YB(7,4,4),
+ $ DT19YC(7,4,4), DT19YD(7,4,4), DTEMP(5),
+ $ ST7B(4,4)
INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
* .. External Functions ..
- REAL SDOT
- EXTERNAL SDOT
+ REAL SDOT, SDSDOT
+ EXTERNAL SDOT, SDSDOT
* .. External Subroutines ..
- EXTERNAL SAXPY, SCOPY, SSWAP, STEST, STEST1
+ EXTERNAL SAXPY, SCOPY, SROTM, SSWAP, STEST, STEST1
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
+ EQUIVALENCE (DT19X(1,1,1),DT19XA(1,1,1)),(DT19X(1,1,5),
+ A DT19XB(1,1,1)),(DT19X(1,1,9),DT19XC(1,1,1)),
+ B (DT19X(1,1,13),DT19XD(1,1,1))
+ EQUIVALENCE (DT19Y(1,1,1),DT19YA(1,1,1)),(DT19Y(1,1,5),
+ A DT19YB(1,1,1)),(DT19Y(1,1,9),DT19YC(1,1,1)),
+ B (DT19Y(1,1,13),DT19YD(1,1,1))
+
DATA SA/0.3E0/
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
DATA DT7/0.0E0, 0.30E0, 0.21E0, 0.62E0, 0.0E0,
+ 0.30E0, -0.07E0, 0.85E0, 0.0E0, 0.30E0, -0.79E0,
+ -0.74E0, 0.0E0, 0.30E0, 0.33E0, 1.27E0/
+ DATA ST7B/ .1, .4, .31, .72, .1, .4, .03, .95,
+ + .1, .4, -.69, -.64, .1, .4, .43, 1.37/
DATA DT8/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
+ 0.0E0, 0.68E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,
+ 0.0E0, 0.0E0, 0.68E0, -0.87E0, 0.0E0, 0.0E0,
+ 0.0E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,
+ 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,
+ 1.17E0, 1.17E0, 1.17E0/
+ DATA SSIZE3/ .1, .4, 1.7, 3.3 /
+*
+* FOR DROTM
+*
+ DATA DPAR/-2.E0, 0.E0,0.E0,0.E0,0.E0,
+ A -1.E0, 2.E0, -3.E0, -4.E0, 5.E0,
+ B 0.E0, 0.E0, 2.E0, -3.E0, 0.E0,
+ C 1.E0, 5.E0, 2.E0, 0.E0, -4.E0/
+* TRUE X RESULTS F0R ROTATIONS DROTM
+ DATA DT19XA/.6E0, 0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
+ A .6E0, 0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,
+ B .6E0, 0.E0,0.E0,0.E0,0.E0,0.E0,0.E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0,0.E0,0.E0,
+ J 1.7E0, -.9E0, .5E0, 0.E0,0.E0,0.E0,0.E0,
+ K -2.6E0, -.9E0, -1.3E0, 0.E0,0.E0,0.E0,0.E0,
+ L .5E0, -.9E0, .3E0, .7E0, -.6E0, .2E0, .8E0,
+ M .7E0, -.9E0, 1.2E0, .7E0, -1.5E0, .2E0, 1.6E0,
+ N 1.7E0, -.9E0, .5E0, .7E0, -1.6E0, .2E0, 2.4E0,
+ O -2.6E0, -.9E0, -1.3E0, .7E0, 2.9E0, .2E0, -4.0E0 /
+*
* .. Executable Statements ..
*
DO 120 KI = 1, 4
80 CONTINUE
CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0E0)
CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)
+ ELSEIF (ICASE.EQ.12) THEN
+* .. SROTM ..
+ KNI=KN+4*(KI-1)
+ DO KPAR=1,4
+ DO I=1,7
+ SX(I) = DX1(I)
+ SY(I) = DY1(I)
+ STX(I)= DT19X(I,KPAR,KNI)
+ STY(I)= DT19Y(I,KPAR,KNI)
+ END DO
+*
+ DO I=1,5
+ DTEMP(I) = DPAR(I,KPAR)
+ END DO
+*
+ DO I=1,LENX
+ SSIZE(I)=STX(I)
+ END DO
+* SEE REMARK ABOVE ABOUT DT11X(1,2,7)
+* AND DT11X(5,3,8).
+ IF ((KPAR .EQ. 2) .AND. (KNI .EQ. 7))
+ $ SSIZE(1) = 2.4E0
+ IF ((KPAR .EQ. 3) .AND. (KNI .EQ. 8))
+ $ SSIZE(5) = 1.8E0
+*
+ CALL SROTM(N,SX,INCX,SY,INCY,DTEMP)
+ CALL STEST(LENX,SX,STX,SSIZE,SFAC)
+ CALL STEST(LENY,SY,STY,STY,SFAC)
+ END DO
+ ELSEIF (ICASE.EQ.13) THEN
+* .. SDSROT ..
+ CALL STEST1 (SDSDOT(N,.1,SX,INCX,SY,INCY),
+ $ ST7B(KN,KI),SSIZE3(KN),SFAC)
ELSE
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
STOP
* .. Scalar Arguments ..
REAL SFAC
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
REAL SC, SS
* .. Intrinsic Functions ..
INTRINSIC ABS, MIN
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Data statements ..
DATA INCXS/1, 2, -2, -1/
DATA INCYS/1, -2, 1, -2/
* .. Array Arguments ..
REAL SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
REAL SD
* .. Intrinsic Functions ..
INTRINSIC ABS
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Executable Statements ..
*
DO 40 I = 1, LEN
PASS = .FALSE.
WRITE (NOUT,99999)
WRITE (NOUT,99998)
- 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),
+ 20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, I, SCOMP(I),
+ STRUE(I), SD, SSIZE(I)
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
-99998 FORMAT (/' CASE N INCX INCY MODE I ',
+99998 FORMAT (/' CASE N INCX INCY I ',
+ ' COMP(I) TRUE(I) DIFFERENCE',
+ ' SIZE(I)',/1X)
-99997 FORMAT (1X,I4,I3,3I5,I3,2E36.8,2E12.4)
+99997 FORMAT (1X,I4,I3,2I5,I3,2E36.8,2E12.4)
END
SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
* ************************* STEST1 *****************************
* .. Scalar Arguments ..
INTEGER ICOMP, ITRUE
* .. Scalars in Common ..
- INTEGER ICASE, INCX, INCY, MODE, N
+ INTEGER ICASE, INCX, INCY, N
LOGICAL PASS
* .. Local Scalars ..
INTEGER ID
* .. Common blocks ..
- COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
+ COMMON /COMBLA/ICASE, N, INCX, INCY, PASS
* .. Executable Statements ..
*
IF (ICOMP.EQ.ITRUE) GO TO 40
WRITE (NOUT,99999)
WRITE (NOUT,99998)
20 ID = ICOMP - ITRUE
- WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID
+ WRITE (NOUT,99997) ICASE, N, INCX, INCY, ICOMP, ITRUE, ID
40 CONTINUE
RETURN
*
99999 FORMAT (' FAIL')
-99998 FORMAT (/' CASE N INCX INCY MODE ',
+99998 FORMAT (/' CASE N INCX INCY ',
+ ' COMP TRUE DIFFERENCE',
+ /1X)
-99997 FORMAT (1X,I4,I3,3I5,2I36,I12)
+99997 FORMAT (1X,I4,I3,2I5,2I36,I12)
END