98 SUBROUTINE slartg( F, G, CS, SN, R )
113 parameter ( zero = 0.0e0 )
115 parameter ( one = 1.0e0 )
117 parameter ( two = 2.0e0 )
122 REAL EPS, F1, G1, SAFMIN, SAFMN2, SAFMX2, SCALE
129 INTRINSIC abs, int, log, max, sqrt
140 safmin = slamch(
'S' )
142 safmn2 = slamch(
'B' )**int( log( safmin / eps ) /
143 $ log( slamch(
'B' ) ) / two )
144 safmx2 = one / safmn2
151 ELSE IF( f.EQ.zero )
THEN
158 scale = max( abs( f1 ), abs( g1 ) )
159 IF( scale.GE.safmx2 )
THEN
165 scale = max( abs( f1 ), abs( g1 ) )
166 IF( scale.GE.safmx2 )
168 r = sqrt( f1**2+g1**2 )
174 ELSE IF( scale.LE.safmn2 )
THEN
180 scale = max( abs( f1 ), abs( g1 ) )
181 IF( scale.LE.safmn2 )
183 r = sqrt( f1**2+g1**2 )
190 r = sqrt( f1**2+g1**2 )
194 IF( abs( f ).GT.abs( g ) .AND. cs.LT.zero )
THEN
subroutine slartg(F, G, CS, SN, R)
SLARTG generates a plane rotation with real cosine and real sine.