129 complex(wp) f, g, r, s
132 real(wp) :: d, f1, f2, g1, g2, h2, p, u, uu, v, vv, w
133 complex(wp) :: fs, gs, t
136 intrinsic :: abs, aimag, conjg, max, min, real, sqrt
142 abssq( t ) = real( t )**2 + aimag( t )**2
146 if( g ==
czero )
then
150 else if( f ==
czero )
then
152 g1 = max( abs(real(g)), abs(aimag(g)) )
153 if( g1 > rtmin .and. g1 < rtmax )
then
165 u = min( safmax, max( safmin, g1 ) )
174 f1 = max( abs(real(f)), abs(aimag(f)) )
175 g1 = max( abs(real(g)), abs(aimag(g)) )
176 if( f1 > rtmin .and. f1 < rtmax .and. &
177 g1 > rtmin .and. g1 < rtmax )
then
184 if( f2 > rtmin .and. h2 < rtmax )
then
187 d = sqrt( f2 )*sqrt( h2 )
191 s = conjg( g )*( f*p )
197 u = min( safmax, max( safmin, f1, g1 ) )
201 if( f1*uu < rtmin )
then
206 v = min( safmax, max( safmin, f1 ) )
221 if( f2 > rtmin .and. h2 < rtmax )
then
224 d = sqrt( f2 )*sqrt( h2 )
228 s = conjg( gs )*( fs*p )
229 r = ( fs*( h2*p ) )*u
subroutine clartg(f, g, c, s, r)
CLARTG generates a plane rotation with real cosine and complex sine.
real(sp), parameter srtmax
real(sp), parameter srtmin
complex(sp), parameter czero
real(sp), parameter ssafmin
real(sp), parameter ssafmax
real(sp), parameter szero
LA_CONSTANTS is a module for the scaling constants for the compiled Fortran single and double precisi...