F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06FLF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F06FLF returns the absolutely largest and absolutely smallest values from a real vector.

## 2  Specification

 SUBROUTINE F06FLF ( N, X, INCX, XMAX, XMIN)
 INTEGER N, INCX REAL (KIND=nag_wp) X(*), XMAX, XMIN

## 3  Description

F06FLF returns the values ${x}_{\mathrm{max}}$ and ${x}_{\mathrm{min}}$ given by
 $xmax=maxixi, xmin=minixi,$
where $x$ is an $n$-element real vector scattered with stride INCX. If $n<1$, then ${x}_{\mathrm{max}}$ and ${x}_{\mathrm{min}}$ are returned as zero.
None.

## 5  Parameters

1:     N – INTEGERInput
On entry: $n$, the number of elements in $x$.
2:     X($*$) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array X must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{N}}-1\right)×{\mathbf{INCX}}\right)$.
On entry: the $n$-element vector $x$. ${x}_{\mathit{i}}$ must be stored in ${\mathbf{X}}\left(1+\left(\mathit{i}-1\right)×{\mathbf{INCX}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{N}}$.
Intermediate elements of X are not referenced.
3:     INCX – INTEGERInput
On entry: the increment in the subscripts of X between successive elements of $x$.
Constraint: ${\mathbf{INCX}}>0$.
4:     XMAX – REAL (KIND=nag_wp)Output
On exit: the value ${x}_{\mathrm{max}}=\underset{i}{\mathrm{max}}\phantom{\rule{0.25em}{0ex}}\left|{x}_{i}\right|$.
5:     XMIN – REAL (KIND=nag_wp)Output
On exit: the value ${x}_{\mathrm{min}}=\underset{i}{\mathrm{min}}\phantom{\rule{0.25em}{0ex}}\left|{x}_{i}\right|$.

None.

Not applicable.