root / src / blas / srotmg.f @ 2
Historique | Voir | Annoter | Télécharger (4,66 ko)
| 1 | 1 | pfleura2 | SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM) |
|---|---|---|---|
| 2 | 1 | pfleura2 | * .. Scalar Arguments .. |
| 3 | 1 | pfleura2 | REAL SD1,SD2,SX1,SY1 |
| 4 | 1 | pfleura2 | * .. |
| 5 | 1 | pfleura2 | * .. Array Arguments .. |
| 6 | 1 | pfleura2 | REAL SPARAM(5) |
| 7 | 1 | pfleura2 | * .. |
| 8 | 1 | pfleura2 | * |
| 9 | 1 | pfleura2 | * Purpose |
| 10 | 1 | pfleura2 | * ======= |
| 11 | 1 | pfleura2 | * |
| 12 | 1 | pfleura2 | * CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS |
| 13 | 1 | pfleura2 | * THE SECOND COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)* |
| 14 | 1 | pfleura2 | * SY2)**T. |
| 15 | 1 | pfleura2 | * WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS.. |
| 16 | 1 | pfleura2 | * |
| 17 | 1 | pfleura2 | * SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0 |
| 18 | 1 | pfleura2 | * |
| 19 | 1 | pfleura2 | * (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0) |
| 20 | 1 | pfleura2 | * H=( ) ( ) ( ) ( ) |
| 21 | 1 | pfleura2 | * (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0). |
| 22 | 1 | pfleura2 | * LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22 |
| 23 | 1 | pfleura2 | * RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE |
| 24 | 1 | pfleura2 | * VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.) |
| 25 | 1 | pfleura2 | * |
| 26 | 1 | pfleura2 | * THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE |
| 27 | 1 | pfleura2 | * INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE |
| 28 | 1 | pfleura2 | * OF SD1 AND SD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM. |
| 29 | 1 | pfleura2 | * |
| 30 | 1 | pfleura2 | * |
| 31 | 1 | pfleura2 | * Arguments |
| 32 | 1 | pfleura2 | * ========= |
| 33 | 1 | pfleura2 | * |
| 34 | 1 | pfleura2 | * |
| 35 | 1 | pfleura2 | * SD1 (input/output) REAL |
| 36 | 1 | pfleura2 | * |
| 37 | 1 | pfleura2 | * SD2 (input/output) REAL |
| 38 | 1 | pfleura2 | * |
| 39 | 1 | pfleura2 | * SX1 (input/output) REAL |
| 40 | 1 | pfleura2 | * |
| 41 | 1 | pfleura2 | * SY1 (input) REAL |
| 42 | 1 | pfleura2 | * |
| 43 | 1 | pfleura2 | * |
| 44 | 1 | pfleura2 | * SPARAM (input/output) REAL array, dimension 5 |
| 45 | 1 | pfleura2 | * SPARAM(1)=SFLAG |
| 46 | 1 | pfleura2 | * SPARAM(2)=SH11 |
| 47 | 1 | pfleura2 | * SPARAM(3)=SH21 |
| 48 | 1 | pfleura2 | * SPARAM(4)=SH12 |
| 49 | 1 | pfleura2 | * SPARAM(5)=SH22 |
| 50 | 1 | pfleura2 | * |
| 51 | 1 | pfleura2 | * ===================================================================== |
| 52 | 1 | pfleura2 | * |
| 53 | 1 | pfleura2 | * .. Local Scalars .. |
| 54 | 1 | pfleura2 | REAL GAM,GAMSQ,ONE,RGAMSQ,SFLAG,SH11,SH12,SH21,SH22,SP1,SP2,SQ1, |
| 55 | 1 | pfleura2 | + SQ2,STEMP,SU,TWO,ZERO |
| 56 | 1 | pfleura2 | INTEGER IGO |
| 57 | 1 | pfleura2 | * .. |
| 58 | 1 | pfleura2 | * .. Intrinsic Functions .. |
| 59 | 1 | pfleura2 | INTRINSIC ABS |
| 60 | 1 | pfleura2 | * .. |
| 61 | 1 | pfleura2 | * .. Data statements .. |
| 62 | 1 | pfleura2 | * |
| 63 | 1 | pfleura2 | DATA ZERO,ONE,TWO/0.E0,1.E0,2.E0/ |
| 64 | 1 | pfleura2 | DATA GAM,GAMSQ,RGAMSQ/4096.E0,1.67772E7,5.96046E-8/ |
| 65 | 1 | pfleura2 | * .. |
| 66 | 1 | pfleura2 | |
| 67 | 1 | pfleura2 | IF (.NOT.SD1.LT.ZERO) GO TO 10 |
| 68 | 1 | pfleura2 | * GO ZERO-H-D-AND-SX1.. |
| 69 | 1 | pfleura2 | GO TO 60 |
| 70 | 1 | pfleura2 | 10 CONTINUE |
| 71 | 1 | pfleura2 | * CASE-SD1-NONNEGATIVE |
| 72 | 1 | pfleura2 | SP2 = SD2*SY1 |
| 73 | 1 | pfleura2 | IF (.NOT.SP2.EQ.ZERO) GO TO 20 |
| 74 | 1 | pfleura2 | SFLAG = -TWO |
| 75 | 1 | pfleura2 | GO TO 260 |
| 76 | 1 | pfleura2 | * REGULAR-CASE.. |
| 77 | 1 | pfleura2 | 20 CONTINUE |
| 78 | 1 | pfleura2 | SP1 = SD1*SX1 |
| 79 | 1 | pfleura2 | SQ2 = SP2*SY1 |
| 80 | 1 | pfleura2 | SQ1 = SP1*SX1 |
| 81 | 1 | pfleura2 | * |
| 82 | 1 | pfleura2 | IF (.NOT.ABS(SQ1).GT.ABS(SQ2)) GO TO 40 |
| 83 | 1 | pfleura2 | SH21 = -SY1/SX1 |
| 84 | 1 | pfleura2 | SH12 = SP2/SP1 |
| 85 | 1 | pfleura2 | * |
| 86 | 1 | pfleura2 | SU = ONE - SH12*SH21 |
| 87 | 1 | pfleura2 | * |
| 88 | 1 | pfleura2 | IF (.NOT.SU.LE.ZERO) GO TO 30 |
| 89 | 1 | pfleura2 | * GO ZERO-H-D-AND-SX1.. |
| 90 | 1 | pfleura2 | GO TO 60 |
| 91 | 1 | pfleura2 | 30 CONTINUE |
| 92 | 1 | pfleura2 | SFLAG = ZERO |
| 93 | 1 | pfleura2 | SD1 = SD1/SU |
| 94 | 1 | pfleura2 | SD2 = SD2/SU |
| 95 | 1 | pfleura2 | SX1 = SX1*SU |
| 96 | 1 | pfleura2 | * GO SCALE-CHECK.. |
| 97 | 1 | pfleura2 | GO TO 100 |
| 98 | 1 | pfleura2 | 40 CONTINUE |
| 99 | 1 | pfleura2 | IF (.NOT.SQ2.LT.ZERO) GO TO 50 |
| 100 | 1 | pfleura2 | * GO ZERO-H-D-AND-SX1.. |
| 101 | 1 | pfleura2 | GO TO 60 |
| 102 | 1 | pfleura2 | 50 CONTINUE |
| 103 | 1 | pfleura2 | SFLAG = ONE |
| 104 | 1 | pfleura2 | SH11 = SP1/SP2 |
| 105 | 1 | pfleura2 | SH22 = SX1/SY1 |
| 106 | 1 | pfleura2 | SU = ONE + SH11*SH22 |
| 107 | 1 | pfleura2 | STEMP = SD2/SU |
| 108 | 1 | pfleura2 | SD2 = SD1/SU |
| 109 | 1 | pfleura2 | SD1 = STEMP |
| 110 | 1 | pfleura2 | SX1 = SY1*SU |
| 111 | 1 | pfleura2 | * GO SCALE-CHECK |
| 112 | 1 | pfleura2 | GO TO 100 |
| 113 | 1 | pfleura2 | * PROCEDURE..ZERO-H-D-AND-SX1.. |
| 114 | 1 | pfleura2 | 60 CONTINUE |
| 115 | 1 | pfleura2 | SFLAG = -ONE |
| 116 | 1 | pfleura2 | SH11 = ZERO |
| 117 | 1 | pfleura2 | SH12 = ZERO |
| 118 | 1 | pfleura2 | SH21 = ZERO |
| 119 | 1 | pfleura2 | SH22 = ZERO |
| 120 | 1 | pfleura2 | * |
| 121 | 1 | pfleura2 | SD1 = ZERO |
| 122 | 1 | pfleura2 | SD2 = ZERO |
| 123 | 1 | pfleura2 | SX1 = ZERO |
| 124 | 1 | pfleura2 | * RETURN.. |
| 125 | 1 | pfleura2 | GO TO 220 |
| 126 | 1 | pfleura2 | * PROCEDURE..FIX-H.. |
| 127 | 1 | pfleura2 | 70 CONTINUE |
| 128 | 1 | pfleura2 | IF (.NOT.SFLAG.GE.ZERO) GO TO 90 |
| 129 | 1 | pfleura2 | * |
| 130 | 1 | pfleura2 | IF (.NOT.SFLAG.EQ.ZERO) GO TO 80 |
| 131 | 1 | pfleura2 | SH11 = ONE |
| 132 | 1 | pfleura2 | SH22 = ONE |
| 133 | 1 | pfleura2 | SFLAG = -ONE |
| 134 | 1 | pfleura2 | GO TO 90 |
| 135 | 1 | pfleura2 | 80 CONTINUE |
| 136 | 1 | pfleura2 | SH21 = -ONE |
| 137 | 1 | pfleura2 | SH12 = ONE |
| 138 | 1 | pfleura2 | SFLAG = -ONE |
| 139 | 1 | pfleura2 | 90 CONTINUE |
| 140 | 1 | pfleura2 | GO TO IGO(120,150,180,210) |
| 141 | 1 | pfleura2 | * PROCEDURE..SCALE-CHECK |
| 142 | 1 | pfleura2 | 100 CONTINUE |
| 143 | 1 | pfleura2 | 110 CONTINUE |
| 144 | 1 | pfleura2 | IF (.NOT.SD1.LE.RGAMSQ) GO TO 130 |
| 145 | 1 | pfleura2 | IF (SD1.EQ.ZERO) GO TO 160 |
| 146 | 1 | pfleura2 | ASSIGN 120 TO IGO |
| 147 | 1 | pfleura2 | * FIX-H.. |
| 148 | 1 | pfleura2 | GO TO 70 |
| 149 | 1 | pfleura2 | 120 CONTINUE |
| 150 | 1 | pfleura2 | SD1 = SD1*GAM**2 |
| 151 | 1 | pfleura2 | SX1 = SX1/GAM |
| 152 | 1 | pfleura2 | SH11 = SH11/GAM |
| 153 | 1 | pfleura2 | SH12 = SH12/GAM |
| 154 | 1 | pfleura2 | GO TO 110 |
| 155 | 1 | pfleura2 | 130 CONTINUE |
| 156 | 1 | pfleura2 | 140 CONTINUE |
| 157 | 1 | pfleura2 | IF (.NOT.SD1.GE.GAMSQ) GO TO 160 |
| 158 | 1 | pfleura2 | ASSIGN 150 TO IGO |
| 159 | 1 | pfleura2 | * FIX-H.. |
| 160 | 1 | pfleura2 | GO TO 70 |
| 161 | 1 | pfleura2 | 150 CONTINUE |
| 162 | 1 | pfleura2 | SD1 = SD1/GAM**2 |
| 163 | 1 | pfleura2 | SX1 = SX1*GAM |
| 164 | 1 | pfleura2 | SH11 = SH11*GAM |
| 165 | 1 | pfleura2 | SH12 = SH12*GAM |
| 166 | 1 | pfleura2 | GO TO 140 |
| 167 | 1 | pfleura2 | 160 CONTINUE |
| 168 | 1 | pfleura2 | 170 CONTINUE |
| 169 | 1 | pfleura2 | IF (.NOT.ABS(SD2).LE.RGAMSQ) GO TO 190 |
| 170 | 1 | pfleura2 | IF (SD2.EQ.ZERO) GO TO 220 |
| 171 | 1 | pfleura2 | ASSIGN 180 TO IGO |
| 172 | 1 | pfleura2 | * FIX-H.. |
| 173 | 1 | pfleura2 | GO TO 70 |
| 174 | 1 | pfleura2 | 180 CONTINUE |
| 175 | 1 | pfleura2 | SD2 = SD2*GAM**2 |
| 176 | 1 | pfleura2 | SH21 = SH21/GAM |
| 177 | 1 | pfleura2 | SH22 = SH22/GAM |
| 178 | 1 | pfleura2 | GO TO 170 |
| 179 | 1 | pfleura2 | 190 CONTINUE |
| 180 | 1 | pfleura2 | 200 CONTINUE |
| 181 | 1 | pfleura2 | IF (.NOT.ABS(SD2).GE.GAMSQ) GO TO 220 |
| 182 | 1 | pfleura2 | ASSIGN 210 TO IGO |
| 183 | 1 | pfleura2 | * FIX-H.. |
| 184 | 1 | pfleura2 | GO TO 70 |
| 185 | 1 | pfleura2 | 210 CONTINUE |
| 186 | 1 | pfleura2 | SD2 = SD2/GAM**2 |
| 187 | 1 | pfleura2 | SH21 = SH21*GAM |
| 188 | 1 | pfleura2 | SH22 = SH22*GAM |
| 189 | 1 | pfleura2 | GO TO 200 |
| 190 | 1 | pfleura2 | 220 CONTINUE |
| 191 | 1 | pfleura2 | IF (SFLAG) 250,230,240 |
| 192 | 1 | pfleura2 | 230 CONTINUE |
| 193 | 1 | pfleura2 | SPARAM(3) = SH21 |
| 194 | 1 | pfleura2 | SPARAM(4) = SH12 |
| 195 | 1 | pfleura2 | GO TO 260 |
| 196 | 1 | pfleura2 | 240 CONTINUE |
| 197 | 1 | pfleura2 | SPARAM(2) = SH11 |
| 198 | 1 | pfleura2 | SPARAM(5) = SH22 |
| 199 | 1 | pfleura2 | GO TO 260 |
| 200 | 1 | pfleura2 | 250 CONTINUE |
| 201 | 1 | pfleura2 | SPARAM(2) = SH11 |
| 202 | 1 | pfleura2 | SPARAM(3) = SH21 |
| 203 | 1 | pfleura2 | SPARAM(4) = SH12 |
| 204 | 1 | pfleura2 | SPARAM(5) = SH22 |
| 205 | 1 | pfleura2 | 260 CONTINUE |
| 206 | 1 | pfleura2 | SPARAM(1) = SFLAG |
| 207 | 1 | pfleura2 | RETURN |
| 208 | 1 | pfleura2 | END |