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