ZROTG(3)        BLAS routine of NEC Numeric Library Collection        ZROTG(3)



NAME
       ZROTG - Extensions to BLAS level one rotation subroutines


SYNOPSIS
           SUBROUTINE ZROTG ( a, b, c, s )

           DOUBLE COMPLEX
                        a, b, s

           DOUBLE PRECISION
                        c

DESCRIPTION
       ZROTG  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) DOUBLE 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) DOUBLE COMPLEX

               Second vector component.

               The second component of the vector to be rotated.



       c       (output) DOUBLE PRECISION

               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) DOUBLE 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
       ZROTG is an extension to the Level 1 Basic Linear  Algebra  Subprograms
       (Level 1 BLAS).


SEE ALSO
       ZROT(3)



BLAS routine                                                          ZROTG(3)