G01ZUF (PDF version)
G01 Chapter Contents
G01 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

G01ZUF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

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

SUBROUTINE G01ZUF ( RKAPPA, BETA2, MODE, XL, XU, RCOMM, IFAIL)
INTEGER  MODE, IFAIL
REAL (KIND=nag_wp)  RKAPPA, BETA2, XL, XU, RCOMM(322)

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  Parameters

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 – INTEGERInput
On entry: if MODE=0, then 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) arrayCommunication Array
On exit: this parameter should be passed unchanged to G01EUF or G01MUF.
7:     IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ or ​1. 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 -1​ or ​1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is 0. 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,RKAPPA<0.01,
orRKAPPA>10.0,
orBETA2<0.0,
orBETA2>1.0.
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.

7  Accuracy

At least five significant digits are usually correct.

8  Further Comments

None.

9  Example

See Section 9 in G01MUF and G01EUF.

G01ZUF (PDF version)
G01 Chapter Contents
G01 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012