g01mu returns the value of the Vavilov density function ${\varphi }_{V}\left(\lambda \text{;}\kappa ,{\beta }^{2}\right)$.
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 $\lambda$ 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: ${\mathbf{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 ${\varphi }_{V}\left(\lambda \text{;}\kappa ,{\beta }^{2}\right)$.
It is intended to be used after a call to g01zu.

# Description

g01mu evaluates an approximation to the Vavilov density function ${\varphi }_{V}\left(\lambda \text{;}\kappa ,{\beta }^{2}\right)$ given by
 $ϕVλ;κ,β2=12πi∫c-i∞c+i∞eλsfs;κ,β2ds,$
where $\kappa >0$ and $0\le {\beta }^{2}\le 1$, $c$ is an arbitrary real constant and
 $fs;κ,β2=Cκ,β2expsln κ+s+κβ2lnsκ+E1sκ-κexp-sκ.$
${E}_{1}\left(x\right)=\underset{0}{\overset{x}{\int }}{t}^{-1}\left(1-{e}^{-t}\right)dt$ is the exponential integral, $C\left(\kappa ,{\beta }^{2}\right)=\mathrm{exp}\left\{\kappa \left(1+\gamma {\beta }^{2}\right)\right\}$ and $\gamma$ is Euler's constant.
The method used is based on Fourier expansions. Further details can be found in Schorr (1974).
For values of $\kappa \le 0.01$, the Vavilov distribution can be replaced by the Landau distribution since ${\lambda }_{V}=\left({\lambda }_{L}-\mathrm{ln} \kappa \right)/\kappa$. For values of $\kappa \ge 10$, the Vavilov distribution can be replaced by a Gaussian distribution with mean $\mu =\gamma -1-{\beta }^{2}-\mathrm{ln} \kappa$ and variance ${\sigma }^{2}=\left(2-{\beta }^{2}\right)/2\kappa$.

# 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:
${\mathbf{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.
${\mathbf{ifail}}=-9000$
An error occured, see message report.
${\mathbf{ifail}}=-8000$
Negative dimension for array $〈\mathit{\text{value}}〉$
${\mathbf{ifail}}=-6000$
Invalid Parameters $〈\mathit{\text{value}}〉$

# Accuracy

At least five significant digits are usually correct.

# Parallelism and Performance

None.

g01mu can be called repeatedly with different values of $\lambda$ provided that the values of $\kappa$ and ${\beta }^{2}$ remain unchanged between calls. Otherwise, g01zu must be called again. This is illustrated in [Example].

# Example

This example evaluates ${\varphi }_{V}\left(\lambda \text{;}\kappa ,{\beta }^{2}\right)$ at $\lambda =2.5$, $\kappa =0.4$ and ${\beta }^{2}=0.1$, and prints the results.

Example program (C#): g01mue.cs

Example program data: g01mue.d

Example program results: g01mue.r