NAG FL Interface
g01zuf (init_​vavilov)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

g01zuf is used to initialize routines g01euf and g01muf.
It is intended to be used before a call to g01euf or g01muf.

2 Specification

Fortran Interface
Subroutine g01zuf ( rkappa, beta2, mode, xl, xu, rcomm, ifail)
Integer, Intent (In) :: mode
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (In) :: rkappa, beta2
Real (Kind=nag_wp), Intent (Out) :: xl, xu, rcomm(322)
C Header Interface
#include <nag.h>
void  g01zuf_ (const double *rkappa, const double *beta2, const Integer *mode, double *xl, double *xu, double rcomm[], Integer *ifail)
The routine may be called by the names g01zuf or nagf_stat_init_vavilov.

3 Description

g01zuf initializes the array rcomm for use by g01euf or g01muf in the evaluation of the Vavilov functions ϕV(λ;κ,β2) and ΦV(λ;κ,β2) respectively.
Multiple calls to g01euf or g01muf can be made following a single call to g01zuf, provided that rkappa or beta2 do not change, and that either all calls are to g01euf or all calls are to g01muf. If you wish to call both g01euf and g01muf, then you will need to initialize both separately.

4 References

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

5 Arguments

1: rkappa Real (Kind=nag_wp) Input
On entry: the argument κ of the function.
Constraint: 0.01rkappa10.0.
2: beta2 Real (Kind=nag_wp) Input
On entry: the argument β2 of the function.
Constraint: 0.0beta21.0.
3: mode Integer Input
On entry: if mode=0, g01muf is to be called after the call to g01zuf. Otherwise, g01euf is to be called.
4: xl Real (Kind=nag_wp) Output
On exit: xl, a threshold value below which ϕV(λ;κ,β2) will be set to zero by g01muf and ΦV(λ;κ,β2) will be set to zero by g01euf if λ<xl.
5: xu Real (Kind=nag_wp) Output
On exit: xu, a threshold value above which ϕV(λ;κ,β2) will be set to zero by g01muf and ΦV(λ;κ,β2) will be set to unity by g01euf if λ>xu.
6: rcomm(322) Real (Kind=nag_wp) array Communication Array
On exit: this argument should be passed unchanged to g01euf or g01muf.
7: ifail Integer Input/Output
On entry: ifail must be set to 0, -1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of -1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value -1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value 0 is recommended. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry ifail=0 or -1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
ifail=1
On entry, beta2=value.
Constraint: beta21.0.
On entry, beta2=value.
Constraint: beta20.0.
On entry, rkappa=value.
Constraint: rkappa10.0.
On entry, rkappa=value.
Constraint: rkappa0.01.
ifail=2
The initialization has been abandoned due to an internal error. This error exit is unlikely to occur, but if it does change the values of rkappa and/or beta2 and rerun g01zuf.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

At least five significant digits are usually correct.

8 Parallelism and Performance

g01zuf is not threaded in any implementation.

9 Further Comments

None.

10 Example

See Section 10 in g01muf and g01euf.