LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ zrotg()

subroutine zrotg ( complex*16  CA,
complex*16  CB,
double precision  C,
complex*16  S 
)

ZROTG

Purpose:
    ZROTG determines a double complex Givens rotation.
Parameters
[in]CA
          CA is COMPLEX*16
[in]CB
          CB is COMPLEX*16
[out]C
          C is DOUBLE PRECISION
[out]S
          S is COMPLEX*16
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2017

Definition at line 64 of file zrotg.f.

64 *
65 * -- Reference BLAS level1 routine (version 3.8.0) --
66 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
67 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
68 * November 2017
69 *
70 * .. Scalar Arguments ..
71  COMPLEX*16 CA,CB,S
72  DOUBLE PRECISION C
73 * ..
74 *
75 * =====================================================================
76 *
77 * .. Local Scalars ..
78  COMPLEX*16 ALPHA
79  DOUBLE PRECISION NORM,SCALE
80 * ..
81 * .. Intrinsic Functions ..
82  INTRINSIC cdabs,dcmplx,dconjg,dsqrt
83 * ..
84  IF (cdabs(ca).EQ.0.0d0) THEN
85  c = 0.0d0
86  s = (1.0d0,0.0d0)
87  ca = cb
88  ELSE
89  scale = cdabs(ca) + cdabs(cb)
90  norm = scale*dsqrt((cdabs(ca/dcmplx(scale,0.0d0)))**2+
91  $ (cdabs(cb/dcmplx(scale,0.0d0)))**2)
92  alpha = ca/cdabs(ca)
93  c = cdabs(ca)/norm
94  s = alpha*dconjg(cb)/norm
95  ca = alpha*norm
96  END IF
97  RETURN
Here is the caller graph for this function: