Source module last modified on Thu, 2 Jul 1998, 23:17;
HTML image of Fortran source automatically generated by
for2html on Sun, 23 Jun 2002, 15:10.
subroutine drotg(da,db,c,s)
#
# construct givens plane rotation.
# jack dongarra, linpack, 3/11/78.
#
double precision da,db,c,s,roe,scale,r,z
#
roe = db
if( dabs(da) > dabs(db) ) roe = da
scale = dabs(da) + dabs(db)
if( scale != 0.0d0 ) go to 10
c = 1.0d0
s = 0.0d0
r = 0.0d0
z = 0.0d0
go to 20
10 r = scale*dsqrt((da/scale)**2 + (db/scale)**2)
r = dsign(1.0d0,roe)*r
c = da/r
s = db/r
z = 1.0d0
if( dabs(da) > dabs(db) ) z = s
if( dabs(db) >= dabs(da) && c != 0.0d0 ) z = 1.0d0/c
20 da = r
db = z
return
end