g01mu returns the value of the Vavilov density function ϕVλ;κ,β2.
It is intended to be used after a call to g01zu.

Syntax

C#
public static double g01mu(
	double x,
	double[] rcomm,
	out int ifail
)
Visual Basic
Public Shared Function g01mu ( _
	x As Double, _
	rcomm As Double(), _
	<OutAttribute> ByRef ifail As Integer _
) As Double
Visual C++
public:
static double g01mu(
	double x, 
	array<double>^ rcomm, 
	[OutAttribute] int% ifail
)
F#
static member g01mu : 
        x : float * 
        rcomm : float[] * 
        ifail : int byref -> float 

Parameters

x
Type: System..::..Double
On entry: the argument λ of the function.
rcomm
Type: array<System..::..Double>[]()[][]
An array of size [322]
On entry: this must be the same parameter rcomm as returned by a previous call to g01zu.
ifail
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

Return Value

g01mu returns the value of the Vavilov density function ϕVλ;κ,β2.
It is intended to be used after a call to g01zu.

Description

g01mu evaluates an approximation to the Vavilov density function ϕVλ;κ,β2 given by
ϕVλ;κ,β2=12πic-ic+ieλsfs;κ,β2ds,
where κ>0 and 0β21, c is an arbitrary real constant and
fs;κ,β2=Cκ,β2expslnκ+s+κβ2lnsκ+E1sκ-κexp-sκ.
E1x=0xt-11-e-tdt is the exponential integral, Cκ,β2=expκ1+γβ2 and γ is Euler's constant.
The method used is based on Fourier expansions. Further details can be found in Schorr (1974).
For values of κ0.01, the Vavilov distribution can be replaced by the Landau distribution since λV=λL-lnκ/κ. For values of κ10, the Vavilov distribution can be replaced by a Gaussian distribution with mean μ=γ-1-β2-lnκ and variance σ2=2-β2/2κ.

References

Schorr B (1974) Programs for the Landau and the Vavilov distributions and the corresponding random numbers Comp. Phys. Comm. 7 215–224

Error Indicators and Warnings

Errors or warnings detected by the method:
ifail=1
Either the initialization method has not been called prior to the first call of this method or a communication array has become corrupted.
ifail=-9000
An error occured, see message report.
ifail=-8000
Negative dimension for array value
ifail=-6000
Invalid Parameters value

Accuracy

At least five significant digits are usually correct.

Parallelism and Performance

None.

Further Comments

g01mu can be called repeatedly with different values of λ provided that the values of κ and β2 remain unchanged between calls. Otherwise, g01zu must be called again. This is illustrated in [Example].

Example

This example evaluates ϕVλ;κ,β2 at λ=2.5, κ=0.4 and β2=0.1, and prints the results.

Example program (C#): g01mue.cs

Example program data: g01mue.d

Example program results: g01mue.r

See Also