====================================================================
isamax examples
====================================================================

a:PRIMARR(FLOAT):=[[3.0, 4.0, -3.0, 5.0, -1.0]]

  [3.,4.,- 3.,5.,- 1.]

Note that Axiom arrays are 0-based.

isamax(5,a,1)  -- should be 3

  3

isamax(3,a,1)  -- should be 1

  1

The count and increment must both be positive numbers

isamax(0,a,1)  -- should be -1

  - 1

isamax(-5,a,1) -- should be -1

  - 1

isamax(5,a,-1) -- should be -1 

  - 1

isamax(5,a,2)  -- should be 0

  0

isamax(1,a,0)  -- should be -1 

  - 1

isamax(1,a,-1) -- should be -1 

  - 1

The comparison for maximum uses the absolute value

a:PRIMARR(FLOAT):=[[3.0, 4.0, -3.0, -5.0, -1.0]]

  [3.,4.,- 3.,- 5.,- 1.]

isamax(5,a,1)  -- should be 3

  3

====================================================================
Man Page Details
====================================================================

NAME
       ISAMAX - BLAS level one, maximum index function

SYNOPSIS
       INTEGER FUNCTION ISAMAX ( n, x, incx )

           INTEGER               n, incx

           REAL                  x


DESCRIPTION
       ISAMAX searches a real vector for the first occurrence of the the maxi-
       mum absolute value. The vector x has length n and increment incx.

       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

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

       x       REAL. (input)
               Array of dimension (n-1) * |incx| + 1.
               Array x contains the vector to be searched.

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

RETURN VALUES
       ISAMAX  INTEGER. (output)
               Return  the first index of the maximum absolute value of vector
               x.  The vector x has length n and increment incx.

NOTES
       When working 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

