125 subroutine zlassq( n, x, incx, scl, sumsq )
137 real(wp) :: scl, sumsq
145 real(wp) :: abig, amed, asml, ax, ymax, ymin
151 if( sumsq == zero ) scl = one
152 if( scl == zero )
then
173 if( incx < 0 ) ix = 1 - (n-1)*incx
175 ax = abs(real(x(ix)))
177 abig = abig + (ax*sbig)**2
179 else if (ax < tsml)
then
180 if (notbig) asml = asml + (ax*ssml)**2
184 ax = abs(aimag(x(ix)))
186 abig = abig + (ax*sbig)**2
188 else if (ax < tsml)
then
189 if (notbig) asml = asml + (ax*ssml)**2
198 if( sumsq > zero )
then
199 ax = scl*sqrt( sumsq )
201 abig = abig + (ax*sbig)**2
203 else if (ax < tsml)
then
204 if (notbig) asml = asml + (ax*ssml)**2
213 if (abig > zero)
then
217 if (amed > zero .or.
la_isnan(amed))
then
218 abig = abig + (amed*sbig)*sbig
222 else if (asml > zero)
then
226 if (amed > zero .or.
la_isnan(amed))
then
228 asml = sqrt(asml) / ssml
229 if (asml > amed)
then
237 sumsq = ymax**2*( one + (ymin/ymax)**2 )
subroutine zlassq(n, x, incx, scl, sumsq)
ZLASSQ updates a sum of squares represented in scaled form.
real(dp), parameter dtsml
real(dp), parameter dzero
real(dp), parameter dsbig
real(dp), parameter dtbig
real(dp), parameter dssml
LA_CONSTANTS is a module for the scaling constants for the compiled Fortran single and double precisi...