HP MLIB User's Guide Vol. 1 7th Ed.

Chapter 2 Basic Vector Operations 181
Maximum value and location F_SMAX_VAL/F_DMAX_VAL
Name F_SMAX_VAL/F_DMAX_VAL
Maximum value and location
Purpose F_xMAX_VAL returns the largest component of a real vector x and also the
smallest offset or index k.
When the value of the n argument is less than or equal to zero, F_xMAX_VAL
initializes the output scalars k to the largest invalid index (zero) and r to zero.
The routine F_xMIN_VAL operates strictly on real vectors and is not defined
for complex vectors.
Usage VECLIB:
INTEGER*4 INCX, K, N
REAL*4 R
REAL*4 X( * )
SUBROUTINE F_SMAX_VAL (N, X, INCX, K, R)
INTEGER*4 INCX, K, N
REAL*8 R
REAL*8 X( * )
SUBROUTINE F_DMAX_VAL (N, X, INCX, K, R)
VECLIB8:
INTEGER*8 INCX, K, N
REAL*4 R
REAL*4 X( * )
SUBROUTINE F_SMAX_VAL (N, X, INCX, K, R)
INTEGER*8 INCX, K, N
REAL*8 R
REAL*8 X( * )
SUBROUTINE F_DMAX_VAL (N, X, INCX, K, R)
Input N Number of elements of vector x.
X REAL or COMPLEX array, minimum length
(N - 1) x|incx| + 1.
INCX Increment for the array x. A vector x having component
x
i
, i = 1,..., n, is stored in an array X() with increment
argument incx. If incx > 0 then x
i
is stored in
kx
k
such that k arg
0 in<
max x
i
()=,