isamin(3S)

ISAMIN, IDAMIN - Searches a vector for the first occurrence of the minimum absolute value

As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.19.

NAME
     ISAMIN, IDAMIN - Searches a vector for the first occurrence of the
     minimum absolute value

SYNOPSIS
     Single precision

          Fortran:
               integer ISAMIN
               integer index
               index = ISAMIN (n, x, incx)

          C/C++:
               #include <scsl_blas.h>
               int ISAMIN (int n, float *x, int incx);

     Double precision

          Fortran:
               integer IDAMIN
               integer index
               index = IDAMIN (n, x, incx)

          C/C++:
               #include <scsl_blas.h>
               int IDAMIN (int n, double *x, int incx);

IMPLEMENTATION
     These routines are part of the SCSL Scientific Library and can be loaded
     using either the -lscs or the -lscs_mp option.  The -lscs_mp option
     directs the linker to use the multi-processor version of the library.

     When linking to SCSL with -lscs or -lscs_mp, the default integer size is
     4 bytes (32 bits). Another version of SCSL is available in which integers
     are 8 bytes (64 bits).  This version allows the user access to larger
     memory sizes and helps when porting legacy Cray codes.  It can be loaded
     by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
     only one of the two versions; 4-byte integer and 8-byte integer library
     calls cannot be mixed.

     The C and C++ prototypes shown above are appropriate for the 4-byte
     integer version of SCSL. When using the 8-byte integer version, the
     variables of type int become long long and the <scsl_blas_i8.h> header
     file should be included.

DESCRIPTION
     ISAMIN/IDAMIN searches a real vector for the first occurrence of the
     minimum absolute value.

     ISAMIN returns the first index i such that

          |x | = MIN |x | : j = 1, ..., n
            i          j   (j = 0, ..., n-1 for C/C++)



     where xj is an element of a real vector.

     See the NOTES section of this man page for information about the
     interpretation of the data types described in the following arguments.

     These functions have the following arguments:

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

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

     x     Array of dimension (n-1) * |incx| + 1.  (input)
           ISAMIN: Single precision array.
           IDAMIN: Double precision 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:

     Fortran:

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


     C/C++:

          x[-incx * (n-1)], x[incx * (n - 2)], ..., x(0)


     The largest absolute value is:

     Fortran:

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

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

     C/C++:

          |x[incx * (index-1)]| when incx > 0

          |x[-incx * (n-index)]| when incx < 0


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

   Data Types
     The following data types are described in this documentation:

          Term Used                     Data type

     Fortran:

          Array dimensioned n           x(n)

          Integer                       INTEGER (INTEGER*8 for -lscs_i8[_mp])

          Single precision              REAL

          Double precision              DOUBLE PRECISION

     C/C++:

          Array dimensioned n           x[n]

          Integer                       int (long long for -lscs_i8[_mp])

          Single precision              float

          Double precision              double

SEE ALSO
     INTRO_SCSL(3S), INTRO_BLAS1(3S), ISAMAX(3S)

     INTRO_CBLAS(3S) for information about using the C interface to Fortran 77
     Basic Linear Algebra Subprograms (legacy BLAS) set forth by the Basic
     Linear Algebra Subprograms Technical Forum.