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
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