Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

Chapter Contents
Chapter Introduction
NAG Toolbox

# NAG Toolbox: nag_stat_inv_cdf_landau (g01ft)

## Purpose

nag_stat_inv_cdf_landau (g01ft) returns the value of the inverse ${\Phi }^{-1}\left(x\right)$ of the Landau distribution function.

## Syntax

[result, ifail] = g01ft(x)
[result, ifail] = nag_stat_inv_cdf_landau(x)

## Description

nag_stat_inv_cdf_landau (g01ft) evaluates an approximation to the inverse ${\Phi }^{-1}\left(x\right)$ of the Landau distribution function given by
 $Ψx=Φ-1x$
(where $\Phi \left(\lambda \right)$ is described in nag_stat_prob_landau (g01et) and nag_stat_pdf_landau (g01mt)), using either linear or quadratic interpolation or rational approximations which mimic the asymptotic behaviour. Further details can be found in Kölbig and Schorr (1984).
It can also be used to generate Landau distributed random numbers in the range $0.

## References

Kölbig K S and Schorr B (1984) A program package for the Landau distribution Comp. Phys. Comm. 31 97–111

## Parameters

### Compulsory Input Parameters

1:     $\mathrm{x}$ – double scalar
The argument $x$ of the function.
Constraint: $0.0<{\mathbf{x}}<1.0$.

None.

### Output Parameters

1:     $\mathrm{result}$ – double scalar
The result of the function.
2:     $\mathrm{ifail}$int64int32nag_int scalar
${\mathbf{ifail}}={\mathbf{0}}$ unless the function detects an error (see Error Indicators and Warnings).

## Error Indicators and Warnings

Errors or warnings detected by the function:
${\mathbf{ifail}}=1$
 On entry, ${\mathbf{x}}\le 0.0$, or ${\mathbf{x}}\ge 1.0$.
${\mathbf{ifail}}=-99$
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.

## Accuracy

At least $5-6$ significant digits are correct. Such accuracy is normally considered to be adequate for applications in large scale Monte–Carlo simulations.

None.

## Example

This example evaluates ${\Phi }^{-1}\left(x\right)$ at $x=0.5$, and prints the results.
```function g01ft_example

fprintf('g01ft example results\n\n');

x = 0.5;
[psix, ifail] = g01ft(x);

fprintf('Psi(%5.1f) = %7.4f\n', x, psix)

```
```g01ft example results

Psi(  0.5) =  1.3558
```