extremum(3f) - [M_math:statistics] Finds the minimum and maximum value in a REAL array.
Synopsis
Description
Options
Returns
Example
See Also
subroutine extremum(array,small,big)
real,intent(in) :: array(:) real,intent(out) :: small real,intent(out) :: big
Finds the minimum and maximum value in a REAL array.
array The array to find the extremes of
small least value found big largest value found
Sample program:
program demo_extremum use M_math, only : extremum implicit none real,allocatable :: arr(:) real :: small, big arr=[-10.0,8.8,-5.0,0.0,5.0,10.0,-0.3] call extremum(arr,small,big) write(*,*)ARRAY=,arr write(*,*)SMALL=,small write(*,*)BIG=,big end program demo_extremumResults:
ARRAY= -10.000 8.80 -5.00 0.00 5.00 10.0 -0.300 SMALL= -10.000 BIG= 10.00================================================================================
minval(3f), maxval(3f)
Nemo Release 3.1 | extremum (3) | February 23, 2025 |