NAG CL Interface
g01mtc (pdf_​landau)

1 Purpose

g01mtc returns the value of the Landau density function ϕλ.

2 Specification

#include <nag.h>
double  g01mtc (double x)
The function may be called by the names: g01mtc, nag_stat_pdf_landau or nag_prob_density_landau.

3 Description

g01mtc evaluates an approximation to the Landau density function ϕλ given by
ϕλ=12πi c-i c+iexpλs+slnsds,  
where c is an arbitrary real constant, using piecewise approximation by rational functions. Further details can be found in Kölbig and Schorr (1984).
To obtain the value of ϕλ, g01rtc can be used.

4 References

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

5 Arguments

1: x double Input
On entry: the argument λ of the function.

6 Error Indicators and Warnings

None.

7 Accuracy

At least 7 significant digits are usually correct, but occasionally only 6. Such accuracy is normally considered to be adequate for applications in experimental physics.
Because of the asymptotic behaviour of ϕλ, which is of the order of exp-exp-λ, underflow may occur on some machines when λ is moderately large and negative.

8 Parallelism and Performance

g01mtc is not threaded in any implementation.

9 Further Comments

None.

10 Example

This example evaluates ϕλ at λ=0.5, and prints the results.

10.1 Program Text

Program Text (g01mtce.c)

10.2 Program Data

Program Data (g01mtce.d)

10.3 Program Results

Program Results (g01mtce.r)