root / src / blas / zrotg.f @ 8
Historique | Voir | Annoter | Télécharger (797 octet)
1 | 1 | pfleura2 | SUBROUTINE ZROTG(CA,CB,C,S) |
---|---|---|---|
2 | 1 | pfleura2 | * .. Scalar Arguments .. |
3 | 1 | pfleura2 | DOUBLE COMPLEX CA,CB,S |
4 | 1 | pfleura2 | DOUBLE PRECISION C |
5 | 1 | pfleura2 | * .. |
6 | 1 | pfleura2 | * |
7 | 1 | pfleura2 | * Purpose |
8 | 1 | pfleura2 | * ======= |
9 | 1 | pfleura2 | * |
10 | 1 | pfleura2 | * determines a double complex Givens rotation. |
11 | 1 | pfleura2 | * |
12 | 1 | pfleura2 | * .. Local Scalars .. |
13 | 1 | pfleura2 | DOUBLE COMPLEX ALPHA |
14 | 1 | pfleura2 | DOUBLE PRECISION NORM,SCALE |
15 | 1 | pfleura2 | * .. |
16 | 1 | pfleura2 | * .. Intrinsic Functions .. |
17 | 1 | pfleura2 | INTRINSIC CDABS,DCMPLX,DCONJG,DSQRT |
18 | 1 | pfleura2 | * .. |
19 | 1 | pfleura2 | IF (CDABS(CA).NE.0.0d0) GO TO 10 |
20 | 1 | pfleura2 | C = 0.0d0 |
21 | 1 | pfleura2 | S = (1.0d0,0.0d0) |
22 | 1 | pfleura2 | CA = CB |
23 | 1 | pfleura2 | GO TO 20 |
24 | 1 | pfleura2 | 10 CONTINUE |
25 | 1 | pfleura2 | SCALE = CDABS(CA) + CDABS(CB) |
26 | 1 | pfleura2 | NORM = SCALE*DSQRT((CDABS(CA/DCMPLX(SCALE,0.0d0)))**2+ |
27 | 1 | pfleura2 | + (CDABS(CB/DCMPLX(SCALE,0.0d0)))**2) |
28 | 1 | pfleura2 | ALPHA = CA/CDABS(CA) |
29 | 1 | pfleura2 | C = CDABS(CA)/NORM |
30 | 1 | pfleura2 | S = ALPHA*DCONJG(CB)/NORM |
31 | 1 | pfleura2 | CA = ALPHA*NORM |
32 | 1 | pfleura2 | 20 CONTINUE |
33 | 1 | pfleura2 | RETURN |
34 | 1 | pfleura2 | END |