96 SUBROUTINE slartgp( F, G, CS, SN, R )
111 parameter ( zero = 0.0e0 )
113 parameter ( one = 1.0e0 )
115 parameter ( two = 2.0e0 )
120 REAL EPS, F1, G1, SAFMIN, SAFMN2, SAFMX2, SCALE
127 INTRINSIC abs, int, log, max, sign, sqrt
138 safmin = slamch(
'S' )
140 safmn2 = slamch(
'B' )**int( log( safmin / eps ) /
141 $ log( slamch(
'B' ) ) / two )
142 safmx2 = one / safmn2
149 ELSE IF( f.EQ.zero )
THEN
156 scale = max( abs( f1 ), abs( g1 ) )
157 IF( scale.GE.safmx2 )
THEN
163 scale = max( abs( f1 ), abs( g1 ) )
164 IF( scale.GE.safmx2 )
166 r = sqrt( f1**2+g1**2 )
172 ELSE IF( scale.LE.safmn2 )
THEN
178 scale = max( abs( f1 ), abs( g1 ) )
179 IF( scale.LE.safmn2 )
181 r = sqrt( f1**2+g1**2 )
188 r = sqrt( f1**2+g1**2 )
subroutine slartgp(F, G, CS, SN, R)
SLARTGP generates a plane rotation so that the diagonal is nonnegative.