D01GZF calculates the optimal coefficients for use by
D01GCF and
D01GDF,
when the number of points is the product of two primes.
Korobov (1963) gives a procedure for calculating optimal coefficients for
$p$-point integration over the
$n$-cube
${\left[0,1\right]}^{n}$, when the number of points is
where
${p}_{1}$ and
${p}_{2}$ are distinct prime numbers.
The advantage of this procedure is that if
${p}_{1}$ is chosen to be the nearest prime integer to
${p}_{2}^{2}$, then the number of elementary operations required to compute the rule is of the order of
${p}^{4/3}$ which grows less rapidly than the number of operations required by
D01GYF. The associated error is likely to be larger although it may be the only practical alternative for high values of
$p$.
If on entry
${\mathbf{IFAIL}}={\mathbf{0}}$ or
${-{\mathbf{1}}}$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
The optimal coefficients are returned as exact integers (though stored in a real array).
Not applicable.
The time taken by D01GZF grows at least as fast as
${\left({p}_{1}{p}_{2}\right)}^{4/3}$. (See
Section 3.)
This example calculates the Korobov optimal coefficients where the number of dimensons is $4$ and the number of points is the product of the two prime numbers, $89$ and $11$.
None.