121subroutine slassq( n, x, incx, scale, sumsq )
133 real(wp) :: scale, sumsq
141 real(wp) :: abig, amed, asml, ax, ymax, ymin
147 if( sumsq == zero ) scale = one
148 if( scale == zero )
then
169 if( incx < 0 ) ix = 1 - (n-1)*incx
173 abig = abig + (ax*sbig)**2
175 else if (ax < tsml)
then
176 if (notbig) asml = asml + (ax*ssml)**2
185 if( sumsq > zero )
then
186 ax = scale*sqrt( sumsq )
188 if (scale > one)
then
190 abig = abig + scale * (scale * sumsq)
193 abig = abig + scale * (scale * (sbig * (sbig * sumsq)))
195 else if (ax < tsml)
then
197 if (scale < one)
then
199 asml = asml + scale * (scale * sumsq)
202 asml = asml + scale * (scale * (ssml * (ssml * sumsq)))
206 amed = amed + scale * (scale * sumsq)
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 slassq(n, x, incx, scale, sumsq)
SLASSQ updates a sum of squares represented in scaled form.