# NAG CPP Interfacenagcpp::blas::dlange (f06ra)

Settings help

CPP Name Style:

## 1Purpose

dlange returns the value of the $1$-norm, the $\infty$-norm, the Frobenius norm, or the maximum absolute value of the elements of a real $m×n$ matrix.

## 2Specification

```#include "f06/nagcpp_f06ra.hpp"
```
```template <typename A>

double dlange(const string norm, const A &a, OptionalF06RA opt)```
```template <typename A>

double dlange(const string norm, const A &a)```

None.

None.

## 5Arguments

1: $\mathbf{norm}$string Input
On entry: specifies the value to be returned.
${\mathbf{norm}}=\text{'1'}$ or $\text{'O'}$
The $1$-norm.
${\mathbf{norm}}=\text{'I'}$
The $\infty$-norm.
${\mathbf{norm}}=\text{'F'}$ or $\text{'E'}$
The Frobenius (or Euclidean) norm.
${\mathbf{norm}}=\text{'M'}$
The value $\underset{i,j}{\mathrm{max}}\phantom{\rule{0.25em}{0ex}}|{a}_{ij}|$ (not a norm).
Constraint: ${\mathbf{norm}}=\text{'1'}$, $\text{'O'}$, $\text{'I'}$, $\text{'F'}$, $\text{'E'}$ or $\text{'M'}$.
2: $\mathbf{a}\left({\mathbf{m}},{\mathbf{n}}\right)$double array Input
On entry: the $m×n$ matrix $A$.
3: $\mathbf{opt}$OptionalF06RA Input/Output
Optional parameter container, derived from Optional.

1: $\mathbf{m}$
$m$, the number of rows of the matrix $A$
2: $\mathbf{n}$
$n$, the number of columns of the matrix $A$

## 6Exceptions and Warnings

All errors and warnings have an associated numeric error code field, errorid, stored either as a member of the thrown exception object (see errorid), or as a member of opt.ifail, depending on how errors and warnings are being handled (see Error Handling for more details).
Raises: ErrorException
$\mathbf{errorid}=1$
On entry, error in parameter norm.
Constraint: ${\mathbf{norm}}=\text{"1"},\text{"O"},\text{"I"},\text{"F"},\text{"E"}\text{​ or ​}\text{"M"}$.
$\mathbf{errorid}=2$
On entry, error in parameter ${\mathbf{m}}$.
Constraint: ${\mathbf{m}}\ge 0$.
$\mathbf{errorid}=3$
On entry, error in parameter ${\mathbf{n}}$.
Constraint: ${\mathbf{n}}\ge 0$.
$\mathbf{errorid}=10601$
On entry, argument $⟨\mathit{\text{value}}⟩$ must be a $⟨\mathit{\text{value}}⟩$ x $⟨\mathit{\text{value}}⟩$ array.
Supplied argument has $⟨\mathit{\text{value}}⟩$ dimensions.
$\mathbf{errorid}=10601$
On entry, argument $⟨\mathit{\text{value}}⟩$ must be a $⟨\mathit{\text{value}}⟩$ x $⟨\mathit{\text{value}}⟩$ array.
Supplied argument was a $⟨\mathit{\text{value}}⟩$ x $⟨\mathit{\text{value}}⟩$ array.
$\mathbf{errorid}=10601$
On entry, argument $⟨\mathit{\text{value}}⟩$ must be a $⟨\mathit{\text{value}}⟩$ x $⟨\mathit{\text{value}}⟩$ array.
Not all of the sizes for the supplied array could be ascertained.
$\mathbf{errorid}=10602$
On entry, the raw data component of $⟨\mathit{\text{value}}⟩$ is null.
$\mathbf{errorid}=10603$
On entry, unable to ascertain a value for $⟨\mathit{\text{value}}⟩$.
$\mathbf{errorid}=10604$
On entry, the data in $⟨\mathit{\text{value}}⟩$ is stored in $⟨\mathit{\text{value}}⟩$ Major Order.
The data was expected to be in $⟨\mathit{\text{value}}⟩$ Major Order.
$\mathbf{errorid}=-99$
An unexpected error has been triggered by this routine.
$\mathbf{errorid}=-999$
Dynamic memory allocation failed.

Not applicable.

## 8Parallelism and Performance

Please see the description for the underlying computational routine in this section of the FL Interface documentation.