amax(3F)

ISAMAX, IDAMAX, ICAMAX, IZAMAX - Searches a vector for the first occurrence of the maximum absolute value

As shipped in IRIX 6.5.7. Last changed in IRIX 6.5.5.

NAME
     ISAMAX, IDAMAX, ICAMAX, IZAMAX - Searches a vector for the first
     occurrence of the maximum absolute value

SYNOPSIS
     Real

        index = ISAMAX (n, x, incx)

     Double precision

        index = IDAMAX (n, x, incx)

     Complex

        index = ICAMAX (n, x, incx)

     Double complex

        index = IZAMAX (n, x, incx)

IMPLEMENTATION
     IRIX systems

DESCRIPTION
     ISAMAX/IDAMAX searches a real vector for the first occurrence of the
     maximum absolute value.

     ICAMAX/IZAMAX searches a complex vector for the first occurrence of
     the maximum absolute value.

     ISAMAX returns the first index i such that

          |x | = MAX |x | : j = 1, ..., n
            i          j

     where x  is an element of a real vector.
            j

     ICAMAX determines the first index i such that

          ||Real(x )|+ |Imag(x ) | =
                  i           i

          MAX(|Real(x )| + | Imag(x )|): j = 1, ..., n
                     j             j
     where x  is an element of a complex vector.
            j

     These functions have the following arguments:

     index Integer.  (output)
           First index of maximum absolute value.

     n     Integer.  (input)
           Number of elements to process in the vector to be searched.  If
           n <= 0, these routines return 0.

     x     Array of dimension (n-1) * |incx|+1.  (input)
           ISAMAX: Real array.
           IDAMAX: Double precision array.
           ICAMAX: Complex array.
           IZAMAX: Double complex array.

           Array x contains the vector to be searched.

     incx  Integer.  (input)
           Increment between elements of x.

NOTES
     When scanning backward (incx < 0), each routine starts at the end of
     the vector and moves backward, as follows:

          x(1-incx * (n-1)), x(1-incx * (n-2)), ..., x(1)

     The largest absolute value is:

          ABS (x(1+(index-1) * incx)) when incx > 0

          ABS (x(1+(n-index) * |incx|)) when incx < 0

     These routines are Level 1 Basic Linear Algebra Subprograms (Level 1
     BLAS).

SEE ALSO
     This man page is available only online.