1SROTMG(1) BLAS routine SROTMG(1)
2
3
4
6 SROTMG - THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS THE
7 SECOND COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)*
8
10 SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
11
12 REAL SD1,SD2,SX1,SY1
13
14 REAL SPARAM(5)
15
17 CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
18 THE SECOND COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)*
19 SY2)**T.
20 WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
21
22 SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
23
24 (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
25 H=( ) ( ) ( ) ( )
26 (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
27 LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22
28 RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE
29 VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.)
30
31 THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
32 INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
33 OF SD1 AND SD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
34
35
36
38 SD1 (input/output) REAL
39
40 SD2 (input/output) REAL
41
42 SX1 (input/output) REAL
43
44 SY1 (input) REAL
45
46 SPARAM (input/output) REAL array, dimension 5 SPARAM(1)=SFLAG
47 SPARAM(2)=SH11 SPARAM(3)=SH21 SPARAM(4)=SH12 SPARAM(5)=SH22
48
49
50
51BLAS routine February 2007 SROTMG(1)