CROTG(3) BLAS routine of NEC Numeric Library Collection CROTG(3) NAME CROTG - Extensions to BLAS level one rotation subroutines SYNOPSIS SUBROUTINE CROTG ( a, b, c, s ) COMPLEX a, b, s REAL c DESCRIPTION CROTG computes the elements of a Givens plane rotation matrix such that: _ _ _ _ _ _ | c s | | a | | r | |-congj(s) c | * | b | = | 0 | - - - - - - where r = (a / sqrt(conjg(a)*a)) * sqrt ( conjg(a)*a + conjg(b)*b ) , and the notation conjg(z) represents the complex conjugate of z. The Givens plane rotation can be used to introduce zero elements into a matrix selectively. ARGUMENTS a (input and output) COMPLEX First vector component. On input, the first component of the vector to be rotated. On output, a is overwritten by the unique complex number r, whose size in the complex plane is the Euclidean norm of the complex vector (a,b), and whose direction in the complex plane is the same as that of the original complex element a. if |a| != 0 r = a / |a| * sqrt( conjg(a)*a + conjg(b)*b ) if |a| = 0 r = b b (input) COMPLEX Second vector component. The second component of the vector to be rotated. c (output) REAL Cosine of the angle of rotation. if |a| != 0 c = |a| / sqrt( conjg(a)*a + conjg(b)*b ) if |a| = 0 c = 0 s (output) COMPLEX Sine of the angle of rotation. if |a| != 0 c=a/|a|*conjg(b)/sqrt(conjg(a)*a+conjg(b)*b) if |a| = 0 s = ( 1.0 , 0.0 ) NOTE CROTG is an extension to the Level 1 Basic Linear Algebra Subprograms (Level 1 BLAS). SEE ALSO CROT(3) BLAS routine CROTG(3)