HP MLIB User's Guide Vol. 1 7th Ed.
Chapter 2 Basic Vector Operations 57
Maximum of magnitudes SAMAX/DAMAX/IAMAX/SCAMAX/DZAMAX
INTEGER*4 n, incx
REAL*8 s, DZAMAX
COMPLEX*16 x(lenx)
s = DZAMAX(n, x, incx)
VECLIB8:
INTEGER*8 n, incx
REAL*4 s, SAMAX, x(lenx)
s = SAMAX(n, x, incx)
INTEGER*8 n, incx
REAL*8 s, DAMAX, x(lenx)
s = DAMAX(n, x, incx)
INTEGER*8 n, incx, s, IAMAX, x(lenx)
s = IAMAX(n, x, incx)
INTEGER*8 n, incx
REAL*4 s, SCAMAX
COMPLEX*8 x(lenx)
s = SCAMAX(n, x, incx)
INTEGER*8 n, incx
REAL*8 s, DZAMAX
COMPLEX*16 x(lenx)
s = DZAMAX(n, x, incx)
Input n Number of elements of vector x to be used. If n ≤ 0, the
subprograms do not reference x.
x Array of length lenx = (n−1)×|incx|+1 containing the
n-vector x.
incx Increment for the array x. x is stored forward in array x
with increment |incx|; that is, x
i
is stored in
x((i−1)×|incx|+1).
Use incx = 1 if the vector x is stored contiguously in
array x; that is, if x
i
is stored in x(i). Refer to “BLAS
Indexing Conventions” in the introduction to this
chapter.
Output s If n ≤ 0, then s = 0. Otherwise, s is the maximum of the
magnitudes of the elements of x.