Constructs a modified Givens transformation.
BLAS Library (libblas.a)
REAL D1, D2, X1, X2, PARAM(5)
SUBROUTINE DROTMG(D1,D2,X1,X2,PARAM) DOUBLE PRECISION D1,D2,X1,X2,PARAM(5)
The SROTMG or DROTMG subroutine constructs a modified Givens transformation. The input quantities D1, D2, X1, and X2 define a 2-vector in partitioned form:
--- --- --- --- --- --- | a1 | | sqrt(D1) 0 | | X1 | | | = | | | | | a2 | | 0 sqrt(D2) | | X2 | --- --- --- --- --- ---
The subroutines determine the modified Givens rotation matrix H that transforms X2 and, thus, a2 to 0. A representation of this matrix is stored in the array PARAM as follows:
Case 1: PARAM(1) = 1.0 PARAM(2) = H(1,1) PARAM(5) = H(2,2)
Case 2: PARAM(1) = 0.0 PARAM(3) = H(2,1) PARAM(4) = H(1,2)
Case 3: PARAM(1) = -1.0 H(1,1) = PARAM(2) H(2,1) = PARAM(3) H(1,2) = PARAM(4) H(2,2) = PARAM(5)
Case 4: PARAM(1) = -2.0 H = I (Identity matrix)
Note: Locations in PARAM not listed are left unchanged.
|D1||Nonnegative scalar; modified on exit to reflect the results of the transformation.|
|D2||Scalar; can be negative on entry; modified on exit to reflect the results of the transformation.|
|X1||Scalar; modified on exit to reflect the results of the transformation.|
|X2||Scalar; unchanged on exit.|
|PARAM||Vector of dimension (5); values on entry are unused; modified on exit as described above.|
The SROTM and DROTM (SROTM or DROTM Subroutine) subroutines apply the Modified Givens Transformation.