hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_stat_inv_cdf_landau (g01ft)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_stat_inv_cdf_landau (g01ft) returns the value of the inverse Φ-1x 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 Φ-1 x of the Landau distribution function given by
Ψx=Φ-1x  
(where Φλ 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<x<1.

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:     x – double scalar
The argument x of the function.
Constraint: 0.0<x<1.0.

Optional Input Parameters

None.

Output Parameters

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

Error Indicators and Warnings

Errors or warnings detected by the function:
   ifail=1
On entry,x0.0,
orx1.0.
   ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
   ifail=-399
Your licence key may have expired or may not have been installed correctly.
   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.

Further Comments

None.

Example

This example evaluates Φ-1x 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

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015