Routine ID: G115 | |
---|---|
Author(s): A. Rotondi, P. Montagna, K.S. Kölbig | Library: MATHLIB |
Submitter: K.S. Kölbig | Submitted: 10.12.1993 |
Language: Fortran | Revised: |
The VAVLOV package contains subprograms for fast approximate calculation of functions related to the Vavilov distribution.
For $\kappa >0$ and $0\; \le \beta 2\le 1$ , the Vavilov density function is mathematically defined by
$\phi $_{V}(λ;κ,β^{2}) = {1
where c is an arbitrary real constant and
$f(s;\kappa ,\beta 2)\; =\; C(\kappa ,\beta 2)\hspace{0.17em}exps\; ln\kappa +\; (s+\kappa \beta 2)\hspace{0.17em}[\; ln(\{s\kappa \})+E$_{1}({s
$E$_{1}(x)=∫_{0}^{x}t^{-1} (1-e^{-t}) dt is the exponential integral, $C(\kappa ,\beta 2)=exp\kappa (1+\beta 2\gamma )$ , and $\gamma =0.57721...\hspace{0.17em}$ is Euler's constant.
The Vavilov distribution function is defined by
$\Phi $_{V}(λ;κ,β^{2}) = ∫_{-&inf;}^{λ}φ_{V}(λ;κ,β^{2}) dλ
and its inverse by $\Psi $_{V}(x;κ,β^{2})=Φ_{V}^{-1}(x;κ,β^{2}) .
The function $\Psi $_{V}(x;κ,β^{2}) can be used to generate Vavilov random numbers (see Usage).
Structure:
SUBROUTINE and FUNCTION subprograms
User Entry Names: VAVSET, VAVDEN, VAVDIS,
VAVRND, VAVRAN
External References: LOCATF (E106),
DENLAN, DISLAN (G110)
COMMON Block Names and Lenghts: /G115C1/ 226
Usage:
CALL VAVSET(RKAPPA,BETA2,MODE)sets auxiliary quantities used in VAVDEN, VAVDIS and VAVRND; this call has to precede a reference to any of these entries.
VAVDEN(X) | $\phi $_{V}( |
VAVDIS(X) | $\Phi $_{V}( |
VAVRND(X) | $\Psi $_{V}( |
RKAPPA and BETA2 are defined by the last call to VAVSET prior to a reference to VAVDEN, VAVDIS, or VAVRND.
To generate a set of Vavilov random numbers with identical $\kappa $
and $\beta 2$ , VAVSET should be called once and then VAVRND be referenced repeatedly, using as argument X a random number from a uniform distribution over the interval (0,1).
In any arithmetic expression,
VAVRAN(RKAPPA,BETA2,X) has an approximate value of
$\Psi $_{V}(
To generate one Vavilov random number for given values of $\kappa $
and $\beta 2$ , VAVRAN should be used, using as argument X a random number from a uniform distribution over the interval (0,1).
VAVDEN, VAVDIS, VAVRND, VAVRAN and X, RKAPPA, BETA2 are of type REAL, and MODE is of type INTEGER.
Method:
The method is discribed in Ref. 1.
Accuracy:
The accuracy depends on the parameters. Although often rather poor from a mathematical point of view, it is usually sufficient for the intended application in physics (see Notes).
Restrictions:
No test is made whether the parameters $\kappa $ and $\beta 2$
are in the specified ranges.
Notes:
References: