CXML

smin, dmin 


FORMAT

  {S,D}MIN (n, x, incx)

Function Value

  wmin                real*4 |  real*8
                      The smallest value of the elements of the real vector
                      x.
                      If n<=0, wmin = 0.

Arguments

  n                   integer*4
                      On entry, the number of elements n in the vector x.
                      On exit, n is unchanged.

  x                   real*4 |  real*8
                      On entry, a one-dimensional array X of length at least
                      (1+(n-1)*|incx|).  X contains the n elements of the
                      real vector x.

                      On exit, x is unchanged.

  incx                integer*4
                      On entry, the increment for the array X.
                      If incx > 0, vector x is stored forward in the array,
                      so that x(i) is stored in location X(1+(i-1)*incx).
                      If incx < 0, vector x is stored backward in the array,
                      so that x(i) is stored in location X(1+(n-i)*|incx|).
                      If incx = 0, only the first element is accessed.
                      On exit, incx is unchanged.

Description

  SMIN and DMIN are functions that determine the smallest value of the
  elements of a vector x: MIN{x(j), j = 1,2, ..., n}
  If incx < 0, the result is identical to using |incx|. If incx = 0, the
  computation is a time-consuming way of setting wmin = x(1).

Example

  INTEGER*4 N, INCX
  REAL*4 X(40), WMIN
  INCX = 1
  N = 30
  WMIN = SMIN(N,X,INCX)

  This FORTRAN example shows how to compute the smallest value of the
  elements of a vector x.

CXML Home Page

Index of CXML Routines