root / src / blas / crotg.f @ 2
Historique | Voir | Annoter | Télécharger (683 octet)
| 1 | 1 | pfleura2 | SUBROUTINE CROTG(CA,CB,C,S) |
|---|---|---|---|
| 2 | 1 | pfleura2 | * .. Scalar Arguments .. |
| 3 | 1 | pfleura2 | COMPLEX CA,CB,S |
| 4 | 1 | pfleura2 | REAL C |
| 5 | 1 | pfleura2 | * .. |
| 6 | 1 | pfleura2 | * |
| 7 | 1 | pfleura2 | * Purpose |
| 8 | 1 | pfleura2 | * ======= |
| 9 | 1 | pfleura2 | * |
| 10 | 1 | pfleura2 | * CROTG determines a complex Givens rotation. |
| 11 | 1 | pfleura2 | * |
| 12 | 1 | pfleura2 | * .. Local Scalars .. |
| 13 | 1 | pfleura2 | COMPLEX ALPHA |
| 14 | 1 | pfleura2 | REAL NORM,SCALE |
| 15 | 1 | pfleura2 | * .. |
| 16 | 1 | pfleura2 | * .. Intrinsic Functions .. |
| 17 | 1 | pfleura2 | INTRINSIC CABS,CONJG,SQRT |
| 18 | 1 | pfleura2 | * .. |
| 19 | 1 | pfleura2 | IF (CABS(CA).NE.0.) GO TO 10 |
| 20 | 1 | pfleura2 | C = 0. |
| 21 | 1 | pfleura2 | S = (1.,0.) |
| 22 | 1 | pfleura2 | CA = CB |
| 23 | 1 | pfleura2 | GO TO 20 |
| 24 | 1 | pfleura2 | 10 CONTINUE |
| 25 | 1 | pfleura2 | SCALE = CABS(CA) + CABS(CB) |
| 26 | 1 | pfleura2 | NORM = SCALE*SQRT((CABS(CA/SCALE))**2+ (CABS(CB/SCALE))**2) |
| 27 | 1 | pfleura2 | ALPHA = CA/CABS(CA) |
| 28 | 1 | pfleura2 | C = CABS(CA)/NORM |
| 29 | 1 | pfleura2 | S = ALPHA*CONJG(CB)/NORM |
| 30 | 1 | pfleura2 | CA = ALPHA*NORM |
| 31 | 1 | pfleura2 | 20 CONTINUE |
| 32 | 1 | pfleura2 | RETURN |
| 33 | 1 | pfleura2 | END |