LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine drotg ( double precision  DA,
double precision  DB,
double precision  C,
double precision  S 
)

DROTG

Purpose:
    DROTG construct givens plane rotation.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
     jack dongarra, linpack, 3/11/78.

Definition at line 48 of file drotg.f.

48 *
49 * -- Reference BLAS level1 routine (version 3.4.0) --
50 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
51 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
52 * November 2011
53 *
54 * .. Scalar Arguments ..
55  DOUBLE PRECISION c,da,db,s
56 * ..
57 *
58 * =====================================================================
59 *
60 * .. Local Scalars ..
61  DOUBLE PRECISION r,roe,scale,z
62 * ..
63 * .. Intrinsic Functions ..
64  INTRINSIC dabs,dsign,dsqrt
65 * ..
66  roe = db
67  IF (dabs(da).GT.dabs(db)) roe = da
68  scale = dabs(da) + dabs(db)
69  IF (scale.EQ.0.0d0) THEN
70  c = 1.0d0
71  s = 0.0d0
72  r = 0.0d0
73  z = 0.0d0
74  ELSE
75  r = scale*dsqrt((da/scale)**2+ (db/scale)**2)
76  r = dsign(1.0d0,roe)*r
77  c = da/r
78  s = db/r
79  z = 1.0d0
80  IF (dabs(da).GT.dabs(db)) z = s
81  IF (dabs(db).GE.dabs(da) .AND. c.NE.0.0d0) z = 1.0d0/c
82  END IF
83  da = r
84  db = z
85  RETURN

Here is the caller graph for this function: