C Library Functions  - max (3)

NAME

max(3f) - [M_datapac:VECTOR_OPERATION] MAX compute the maximum of a data vector

CONTENTS

Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License
References

SYNOPSIS

SUBROUTINE MAX(X,N,Iwrite,Xmax)

       REAL(kind=wp) :: X(:) , Xmax
       INTEGER :: Iwrite , N

DESCRIPTION

MAX(3f) computes the sample maximum of the data in the input vector x.

INPUT ARGUMENTS

X The vector of (unsorted or sorted) observations.
N The integer number of observations in the vector X.
IWRITE An integer flag code which (if set to 0) will suppress the printing of the sample maximum as it is computed; or (if set to some integer value not equal to 0), like, say, 1) will cause the printing of the sample maximum at the time it is computed.

OUTPUT ARGUMENTS

XMAX The value of the computed sample maximum.

EXAMPLES

Sample program:

   program demo_max
   !use M_datapac, only : max, label
   use M_datapac, only : intel_max=>max, label !  ifort (IFORT) 2021.3.0 20210609 bug

implicit none real :: xmax call label(’max’) call intel_max([-100.0, 200.0, 0.0, 400.0, -200.0],5,1,xmax) !call max([-100.0, 200.0, 0.0, 400.0, -200.0],5,1,xmax) write(*,*)xmax end program demo_max

Results:

    THE MAXIMUM OF THE SET OF 5 OBSERVATIONS IS  0.40000000E+03
      400.000000

AUTHOR

The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.

MAINTAINER

John Urban, 2022.05.31

LICENSE

CC0-1.0

REFERENCES

o David, Order Statistics, 1970, page 7.


Nemo Release 3.1 max (3) July 22, 2023
Generated by manServer 1.08 from d219b4ce-3218-4f19-827a-e709febe75b3 using man macros.