XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ drotmg()

void drotmg ( double *  d1,
double *  d2,
double *  x1,
double  y1,
double  p[] 
)

Construct modified Givens plane rotation (BLAS 1)

Purpose
This routine constructs the modified Givens plane rotation H for the point (x1, y1) as below.
( sqrt(d1') 0 ) * H * ( x1 ) = ( sqrt(d1')*x1' )
( 0 sqrt(d2') ) ( y1 ) ( 0 )
The input values of scaling factors d1, d2 and the output values d1', d2' have the following relationship.
( d1 0 ) = H^T * ( d1' 0 ) * H
( 0 d2 ) ( 0 d2')
The constructed matrix H can be used by drotm to convert the points to the new coordinate system.
Parameters
[in,out]d1[in] The input value of scaling factor d1. On the first call to the routine, this value is typically 1. Subsequent calls typically use the value from the previous call.
[out] The update scaling factor d1'
[in,out]d2[in] The input value of scaling factor d2. On the first call to the routine, this value is typically 1. Subsequent calls typically use the value from the previous call.
[out] The update scaling factor d2'
[in,out]x1[in] X-coordinate value x1.
[out] X-coordinate of the rotated vector, before scaling. (= x1')
[in]y1Y-coordinate value y1.
[out]p[]Array p[lp] (lp >= 5)
Rotation matrix H.
  p[0]: -1, 0, 1 or -2. Each value specifies how the matrix is stored as shown below.
  p[1], p[2], p[3], p[4]: The values of H11, H21, H12 and H22. The values 0, 1 or -1 shown below are not stored in the corresponding elements in the array p[].
  If p[0] = 1,
    H11 = p[1], H21 = -1, H12 = 1, H22 = p[4]
  If p[0] = 0,
    H11 = 1, H21 = p[2], H12 = p[3], H22 = 1
  If p[0] = -1,
    H11 = p[1], H21 = p[2], H12 = p[3], H22 = p[4]
  If p[0] = -2,
    H11 = 1, H21 = 0, H12 = 0, H22 = 1 (H = I)
Reference
BLAS