136subroutine slassq( n, x, incx, scl, sumsq )
148 real(wp) :: scl, sumsq
156 real(wp) :: abig, amed, asml, ax, ymax, ymin
162 if( sumsq == zero ) scl = one
163 if( scl == zero )
then
184 if( incx < 0 ) ix = 1 - (n-1)*incx
188 abig = abig + (ax*sbig)**2
190 else if (ax < tsml)
then
191 if (notbig) asml = asml + (ax*ssml)**2
200 if( sumsq > zero )
then
201 ax = scl*sqrt( sumsq )
204 abig = abig + (scl*sbig)**2 * sumsq
205 else if (ax < tsml)
then
207 if (notbig) asml = asml + (scl*ssml)**2 * sumsq
209 amed = amed + scl**2 * sumsq
216 if (abig > zero)
then
220 if (amed > zero .or.
la_isnan(amed))
then
221 abig = abig + (amed*sbig)*sbig
225 else if (asml > zero)
then
229 if (amed > zero .or.
la_isnan(amed))
then
231 asml = sqrt(asml) / ssml
232 if (asml > amed)
then
240 sumsq = ymax**2*( one + (ymin/ymax)**2 )
subroutine slassq(n, x, incx, scl, sumsq)
SLASSQ updates a sum of squares represented in scaled form.
real(sp), parameter stbig
real(sp), parameter sssml
real(sp), parameter stsml
real(sp), parameter ssbig
real(sp), parameter szero
LA_CONSTANTS is a module for the scaling constants for the compiled Fortran single and double precisi...