|
kusano |
2b45e8 |
SUBROUTINE DROTMGF (DD1,DD2,DX1,DY1,DPARAM)
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
C CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
|
|
kusano |
2b45e8 |
C THE SECOND COMPONENT OF THE 2-VECTOR (DSQRT(DD1)*DX1,DSQRT(DD2)*
|
|
kusano |
2b45e8 |
C DY2)**T.
|
|
kusano |
2b45e8 |
C WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
C DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
C (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
|
|
kusano |
2b45e8 |
C H=( ) ( ) ( ) ( )
|
|
kusano |
2b45e8 |
C (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
|
|
kusano |
2b45e8 |
C LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22
|
|
kusano |
2b45e8 |
C RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE
|
|
kusano |
2b45e8 |
C VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
C THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
|
|
kusano |
2b45e8 |
C INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
|
|
kusano |
2b45e8 |
C OF DD1 AND DD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
DOUBLE PRECISION GAM,ONE,RGAMSQ,DD2,DH11,DH21,DPARAM,DP2,
|
|
kusano |
2b45e8 |
1 DQ2,DU,DY1,ZERO,GAMSQ,DD1,DFLAG,DH12,DH22,DP1,DQ1,
|
|
kusano |
2b45e8 |
2 DTEMP,DX1,TWO
|
|
kusano |
2b45e8 |
DIMENSION DPARAM(5)
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
DATA ZERO,ONE,TWO /0.D0,1.D0,2.D0/
|
|
kusano |
2b45e8 |
DATA GAM,GAMSQ,RGAMSQ/4096.D0,16777216.D0,5.9604645D-8/
|
|
kusano |
2b45e8 |
IF(.NOT. DD1 .LT. ZERO) GO TO 10
|
|
kusano |
2b45e8 |
C GO ZERO-H-D-AND-DX1..
|
|
kusano |
2b45e8 |
GO TO 60
|
|
kusano |
2b45e8 |
10 CONTINUE
|
|
kusano |
2b45e8 |
C CASE-DD1-NONNEGATIVE
|
|
kusano |
2b45e8 |
DP2=DD2*DY1
|
|
kusano |
2b45e8 |
IF(.NOT. DP2 .EQ. ZERO) GO TO 20
|
|
kusano |
2b45e8 |
DFLAG=-TWO
|
|
kusano |
2b45e8 |
GO TO 260
|
|
kusano |
2b45e8 |
C REGULAR-CASE..
|
|
kusano |
2b45e8 |
20 CONTINUE
|
|
kusano |
2b45e8 |
DP1=DD1*DX1
|
|
kusano |
2b45e8 |
DQ2=DP2*DY1
|
|
kusano |
2b45e8 |
DQ1=DP1*DX1
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
IF(.NOT. DABS(DQ1) .GT. DABS(DQ2)) GO TO 40
|
|
kusano |
2b45e8 |
DH21=-DY1/DX1
|
|
kusano |
2b45e8 |
DH12=DP2/DP1
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
DU=ONE-DH12*DH21
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
IF(.NOT. DU .LE. ZERO) GO TO 30
|
|
kusano |
2b45e8 |
C GO ZERO-H-D-AND-DX1..
|
|
kusano |
2b45e8 |
GO TO 60
|
|
kusano |
2b45e8 |
30 CONTINUE
|
|
kusano |
2b45e8 |
DFLAG=ZERO
|
|
kusano |
2b45e8 |
DD1=DD1/DU
|
|
kusano |
2b45e8 |
DD2=DD2/DU
|
|
kusano |
2b45e8 |
DX1=DX1*DU
|
|
kusano |
2b45e8 |
C GO SCALE-CHECK..
|
|
kusano |
2b45e8 |
GO TO 100
|
|
kusano |
2b45e8 |
40 CONTINUE
|
|
kusano |
2b45e8 |
IF(.NOT. DQ2 .LT. ZERO) GO TO 50
|
|
kusano |
2b45e8 |
C GO ZERO-H-D-AND-DX1..
|
|
kusano |
2b45e8 |
GO TO 60
|
|
kusano |
2b45e8 |
50 CONTINUE
|
|
kusano |
2b45e8 |
DFLAG=ONE
|
|
kusano |
2b45e8 |
DH11=DP1/DP2
|
|
kusano |
2b45e8 |
DH22=DX1/DY1
|
|
kusano |
2b45e8 |
DU=ONE+DH11*DH22
|
|
kusano |
2b45e8 |
DTEMP=DD2/DU
|
|
kusano |
2b45e8 |
DD2=DD1/DU
|
|
kusano |
2b45e8 |
DD1=DTEMP
|
|
kusano |
2b45e8 |
DX1=DY1*DU
|
|
kusano |
2b45e8 |
C GO SCALE-CHECK
|
|
kusano |
2b45e8 |
GO TO 100
|
|
kusano |
2b45e8 |
C PROCEDURE..ZERO-H-D-AND-DX1..
|
|
kusano |
2b45e8 |
60 CONTINUE
|
|
kusano |
2b45e8 |
DFLAG=-ONE
|
|
kusano |
2b45e8 |
DH11=ZERO
|
|
kusano |
2b45e8 |
DH12=ZERO
|
|
kusano |
2b45e8 |
DH21=ZERO
|
|
kusano |
2b45e8 |
DH22=ZERO
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
DD1=ZERO
|
|
kusano |
2b45e8 |
DD2=ZERO
|
|
kusano |
2b45e8 |
DX1=ZERO
|
|
kusano |
2b45e8 |
C RETURN..
|
|
kusano |
2b45e8 |
GO TO 220
|
|
kusano |
2b45e8 |
C PROCEDURE..FIX-H..
|
|
kusano |
2b45e8 |
70 CONTINUE
|
|
kusano |
2b45e8 |
IF(.NOT. DFLAG .GE. ZERO) GO TO 90
|
|
kusano |
2b45e8 |
C
|
|
kusano |
2b45e8 |
IF(.NOT. DFLAG .EQ. ZERO) GO TO 80
|
|
kusano |
2b45e8 |
DH11=ONE
|
|
kusano |
2b45e8 |
DH22=ONE
|
|
kusano |
2b45e8 |
DFLAG=-ONE
|
|
kusano |
2b45e8 |
GO TO 90
|
|
kusano |
2b45e8 |
80 CONTINUE
|
|
kusano |
2b45e8 |
DH21=-ONE
|
|
kusano |
2b45e8 |
DH12=ONE
|
|
kusano |
2b45e8 |
DFLAG=-ONE
|
|
kusano |
2b45e8 |
90 CONTINUE
|
|
kusano |
2b45e8 |
GO TO IGO,(120,150,180,210)
|
|
kusano |
2b45e8 |
C PROCEDURE..SCALE-CHECK
|
|
kusano |
2b45e8 |
100 CONTINUE
|
|
kusano |
2b45e8 |
110 CONTINUE
|
|
kusano |
2b45e8 |
IF(.NOT. DD1 .LE. RGAMSQ) GO TO 130
|
|
kusano |
2b45e8 |
IF(DD1 .EQ. ZERO) GO TO 160
|
|
kusano |
2b45e8 |
ASSIGN 120 TO IGO
|
|
kusano |
2b45e8 |
C FIX-H..
|
|
kusano |
2b45e8 |
GO TO 70
|
|
kusano |
2b45e8 |
120 CONTINUE
|
|
kusano |
2b45e8 |
DD1=DD1*GAM**2
|
|
kusano |
2b45e8 |
DX1=DX1/GAM
|
|
kusano |
2b45e8 |
DH11=DH11/GAM
|
|
kusano |
2b45e8 |
DH12=DH12/GAM
|
|
kusano |
2b45e8 |
GO TO 110
|
|
kusano |
2b45e8 |
130 CONTINUE
|
|
kusano |
2b45e8 |
140 CONTINUE
|
|
kusano |
2b45e8 |
IF(.NOT. DD1 .GE. GAMSQ) GO TO 160
|
|
kusano |
2b45e8 |
ASSIGN 150 TO IGO
|
|
kusano |
2b45e8 |
C FIX-H..
|
|
kusano |
2b45e8 |
GO TO 70
|
|
kusano |
2b45e8 |
150 CONTINUE
|
|
kusano |
2b45e8 |
DD1=DD1/GAM**2
|
|
kusano |
2b45e8 |
DX1=DX1*GAM
|
|
kusano |
2b45e8 |
DH11=DH11*GAM
|
|
kusano |
2b45e8 |
DH12=DH12*GAM
|
|
kusano |
2b45e8 |
GO TO 140
|
|
kusano |
2b45e8 |
160 CONTINUE
|
|
kusano |
2b45e8 |
170 CONTINUE
|
|
kusano |
2b45e8 |
IF(.NOT. DABS(DD2) .LE. RGAMSQ) GO TO 190
|
|
kusano |
2b45e8 |
IF(DD2 .EQ. ZERO) GO TO 220
|
|
kusano |
2b45e8 |
ASSIGN 180 TO IGO
|
|
kusano |
2b45e8 |
C FIX-H..
|
|
kusano |
2b45e8 |
GO TO 70
|
|
kusano |
2b45e8 |
180 CONTINUE
|
|
kusano |
2b45e8 |
DD2=DD2*GAM**2
|
|
kusano |
2b45e8 |
DH21=DH21/GAM
|
|
kusano |
2b45e8 |
DH22=DH22/GAM
|
|
kusano |
2b45e8 |
GO TO 170
|
|
kusano |
2b45e8 |
190 CONTINUE
|
|
kusano |
2b45e8 |
200 CONTINUE
|
|
kusano |
2b45e8 |
IF(.NOT. DABS(DD2) .GE. GAMSQ) GO TO 220
|
|
kusano |
2b45e8 |
ASSIGN 210 TO IGO
|
|
kusano |
2b45e8 |
C FIX-H..
|
|
kusano |
2b45e8 |
GO TO 70
|
|
kusano |
2b45e8 |
210 CONTINUE
|
|
kusano |
2b45e8 |
DD2=DD2/GAM**2
|
|
kusano |
2b45e8 |
DH21=DH21*GAM
|
|
kusano |
2b45e8 |
DH22=DH22*GAM
|
|
kusano |
2b45e8 |
GO TO 200
|
|
kusano |
2b45e8 |
220 CONTINUE
|
|
kusano |
2b45e8 |
IF(DFLAG)250,230,240
|
|
kusano |
2b45e8 |
230 CONTINUE
|
|
kusano |
2b45e8 |
DPARAM(3)=DH21
|
|
kusano |
2b45e8 |
DPARAM(4)=DH12
|
|
kusano |
2b45e8 |
GO TO 260
|
|
kusano |
2b45e8 |
240 CONTINUE
|
|
kusano |
2b45e8 |
DPARAM(2)=DH11
|
|
kusano |
2b45e8 |
DPARAM(5)=DH22
|
|
kusano |
2b45e8 |
GO TO 260
|
|
kusano |
2b45e8 |
250 CONTINUE
|
|
kusano |
2b45e8 |
DPARAM(2)=DH11
|
|
kusano |
2b45e8 |
DPARAM(3)=DH21
|
|
kusano |
2b45e8 |
DPARAM(4)=DH12
|
|
kusano |
2b45e8 |
DPARAM(5)=DH22
|
|
kusano |
2b45e8 |
260 CONTINUE
|
|
kusano |
2b45e8 |
DPARAM(1)=DFLAG
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
END
|