104 SUBROUTINE slas2( F, G, H, SSMIN, SSMAX )
111 REAL F, G, H, SSMAX, SSMIN
118 parameter( zero = 0.0e0 )
120 parameter( one = 1.0e0 )
122 parameter( two = 2.0e0 )
125 REAL AS, AT, AU, C, FA, FHMN, FHMX, GA, HA
128 INTRINSIC abs, max, min, sqrt
137 IF( fhmn.EQ.zero )
THEN
139 IF( fhmx.EQ.zero )
THEN
142 ssmax = max( fhmx, ga )*sqrt( one+
143 $ ( min( fhmx, ga ) / max( fhmx, ga ) )**2 )
146 IF( ga.LT.fhmx )
THEN
147 as = one + fhmn / fhmx
148 at = ( fhmx-fhmn ) / fhmx
149 au = ( ga / fhmx )**2
150 c = two / ( sqrt( as*as+au )+sqrt( at*at+au ) )
155 IF( au.EQ.zero )
THEN
161 ssmin = ( fhmn*fhmx ) / ga
164 as = one + fhmn / fhmx
165 at = ( fhmx-fhmn ) / fhmx
166 c = one / ( sqrt( one+( as*au )**2 )+
167 $ sqrt( one+( at*au )**2 ) )
168 ssmin = ( fhmn*c )*au
169 ssmin = ssmin + ssmin
subroutine slas2(f, g, h, ssmin, ssmax)
SLAS2 computes singular values of a 2-by-2 triangular matrix.