root / src / blas / drotg.f @ 10
Historique | Voir | Annoter | Télécharger (838 octet)
1 | 1 | pfleura2 | SUBROUTINE DROTG(DA,DB,C,S) |
---|---|---|---|
2 | 1 | pfleura2 | * .. Scalar Arguments .. |
3 | 1 | pfleura2 | DOUBLE PRECISION C,DA,DB,S |
4 | 1 | pfleura2 | * .. |
5 | 1 | pfleura2 | * |
6 | 1 | pfleura2 | * Purpose |
7 | 1 | pfleura2 | * ======= |
8 | 1 | pfleura2 | * |
9 | 1 | pfleura2 | * construct givens plane rotation. |
10 | 1 | pfleura2 | * jack dongarra, linpack, 3/11/78. |
11 | 1 | pfleura2 | * |
12 | 1 | pfleura2 | * |
13 | 1 | pfleura2 | * .. Local Scalars .. |
14 | 1 | pfleura2 | DOUBLE PRECISION R,ROE,SCALE,Z |
15 | 1 | pfleura2 | * .. |
16 | 1 | pfleura2 | * .. Intrinsic Functions .. |
17 | 1 | pfleura2 | INTRINSIC DABS,DSIGN,DSQRT |
18 | 1 | pfleura2 | * .. |
19 | 1 | pfleura2 | ROE = DB |
20 | 1 | pfleura2 | IF (DABS(DA).GT.DABS(DB)) ROE = DA |
21 | 1 | pfleura2 | SCALE = DABS(DA) + DABS(DB) |
22 | 1 | pfleura2 | IF (SCALE.NE.0.0d0) GO TO 10 |
23 | 1 | pfleura2 | C = 1.0d0 |
24 | 1 | pfleura2 | S = 0.0d0 |
25 | 1 | pfleura2 | R = 0.0d0 |
26 | 1 | pfleura2 | Z = 0.0d0 |
27 | 1 | pfleura2 | GO TO 20 |
28 | 1 | pfleura2 | 10 R = SCALE*DSQRT((DA/SCALE)**2+ (DB/SCALE)**2) |
29 | 1 | pfleura2 | R = DSIGN(1.0d0,ROE)*R |
30 | 1 | pfleura2 | C = DA/R |
31 | 1 | pfleura2 | S = DB/R |
32 | 1 | pfleura2 | Z = 1.0d0 |
33 | 1 | pfleura2 | IF (DABS(DA).GT.DABS(DB)) Z = S |
34 | 1 | pfleura2 | IF (DABS(DB).GE.DABS(DA) .AND. C.NE.0.0d0) Z = 1.0d0/C |
35 | 1 | pfleura2 | 20 DA = R |
36 | 1 | pfleura2 | DB = Z |
37 | 1 | pfleura2 | RETURN |
38 | 1 | pfleura2 | END |