NAG Library Routine Document
G01MUF returns the value of the Vavilov density function , via the routine name.
It is intended to be used after a call to G01ZUF
|REAL (KIND=nag_wp) G01MUF
G01MUF evaluates an approximation to the Vavilov density function
is an arbitrary real constant and
is the exponential integral,
is Euler's constant.
The method used is based on Fourier expansions. Further details can be found in
For values of , the Vavilov distribution can be replaced by the Landau distribution since . For values of , the Vavilov distribution can be replaced by a Gaussian distribution with mean and variance .
Schorr B (1974) Programs for the Landau and the Vavilov distributions and the corresponding random numbers Comp. Phys. Comm. 7 215–224
- 1: X – REAL (KIND=nag_wp)Input
On entry: the argument of the function.
- 2: RCOMM() – REAL (KIND=nag_wp) arrayCommunication Array
: this must
be the same parameter RCOMM
as returned by a previous call to G01ZUF
- 3: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
Either the initialization routine has not been called prior to the first call of this routine or a communication array has become corrupted.
At least five significant digits are usually correct.
G01MUF can be called repeatedly with different values of
provided that the values of
remain unchanged between calls. Otherwise, G01ZUF
must be called again. This is illustrated in Section 9
This example evaluates at , and , and prints the results.
9.1 Program Text
Program Text (g01mufe.f90)
9.2 Program Data
Program Data (g01mufe.d)
9.3 Program Results
Program Results (g01mufe.r)