SG03BY

Compute a complex Givens rotation in real arithmetic

[Specification] [Arguments] [Method] [References] [Comments] [Example]

Purpose

  To compute the parameters for the complex Givens rotation

     (  CR-CI*I   SR-SI*I )   ( XR+XI*I )   ( Z )
     (                    ) * (         ) = (   ),
     ( -SR-SI*I   CR+CI*I )   ( YR+YI*I )   ( 0 )

  where CR, CI, SR, SI, XR, XI, YR, YI are real numbers and I is the
  imaginary unit, I = SQRT(-1). Z is a non-negative real number.

Specification
      SUBROUTINE SG03BY( XR, XI, YR, YI, CR, CI, SR, SI, Z )
C     .. Scalar Arguments ..
       DOUBLE PRECISION  CI, CR, SI, SR, XI, XR, YI, YR, Z

Arguments

Input/Output Parameters

  XR, XI, (input) DOUBLE PRECISION
  YR, YI  (input) DOUBLE PRECISION
          The given real scalars XR, XI, YR, YI.

  CR, CI, (output) DOUBLE PRECISION
  SR, SI, (output) DOUBLE PRECISION
  Z       (output) DOUBLE PRECISION
          The computed real scalars CR, CI, SR, SI, Z, defining the
          complex Givens rotation and Z.

Numerical Aspects
  The subroutine avoids unnecessary overflow.

Further Comments
  In the interest of speed, this routine does not check the input
  for errors.

Example

Program Text

  None
Program Data
  None
Program Results
  None

Return to Supporting Routines index