public interface lassq
LASSQ returns the values scl and smsq such that
( scl2 )*smsq = x( 1 )2 +...+ x( n )2 + ( scale2 )sumsq,
where x( i ) = X( 1 + ( i - 1 )INCX ). The value of sumsq is
assumed to be non-negative.
scale and sumsq must be supplied in SCALE and SUMSQ and
scl and smsq are overwritten on SCALE and SUMSQ respectively.
If scale * sqrt( sumsq ) > tbig then
we require: scale >= sqrt( TINYEPS ) / sbig on entry,
and if 0 < scale * sqrt( sumsq ) < tsml then
we require: scale <= sqrt( HUGE ) / ssml on entry,
where
tbig -- upper threshold for values whose square is representable;
sbig -- scaling constant for big numbers; \see la_constants.f90
tsml -- lower threshold for values whose square is representable;
ssml -- scaling constant for small numbers; \see la_constants.f90
and
TINYEPS -- tiniest representable number;
HUGE -- biggest representable number.
Subroutines
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
n |
|
|
complex(kind=sp),
|
intent(in) |
|
|
:: |
x(*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
incx |
|
|
real(kind=sp),
|
intent(inout) |
|
|
:: |
scl |
|
|
real(kind=sp),
|
intent(inout) |
|
|
:: |
sumsq |
|
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
n |
|
|
real(kind=dp),
|
intent(in) |
|
|
:: |
x(*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
incx |
|
|
real(kind=dp),
|
intent(inout) |
|
|
:: |
scl |
|
|
real(kind=dp),
|
intent(inout) |
|
|
:: |
sumsq |
|
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
n |
|
|
real(kind=sp),
|
intent(in) |
|
|
:: |
x(*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
incx |
|
|
real(kind=sp),
|
intent(inout) |
|
|
:: |
scl |
|
|
real(kind=sp),
|
intent(inout) |
|
|
:: |
sumsq |
|
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
n |
|
|
complex(kind=dp),
|
intent(in) |
|
|
:: |
x(*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
incx |
|
|
real(kind=dp),
|
intent(inout) |
|
|
:: |
scl |
|
|
real(kind=dp),
|
intent(inout) |
|
|
:: |
sumsq |
|
Module Procedures