D01GYF calculates the optimal coefficients for use by
D01GCF and
D01GDF,
for prime numbers of points.
The
Korobov (1963) procedure for calculating the optimal coefficients
for
-point integration over the
-cube
imposes the constraint that
where
is a prime number and
is an adjustable parameter. This parameter is computed to minimize the error in the integral
when computed using the number theoretic rule, and the resulting coefficients can be shown to fit the Korobov definition of optimality.
The computation for large values of
is extremely time consuming (the number of elementary operations varying as
) and there is a practical upper limit to the number of points that can be used. Routine
D01GZF is computationally more economical in this respect but the associated error is likely to be larger.
If on entry
or
, 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).
The time taken is approximately proportional to
(see
Section 3).
This example calculates the Korobov optimal coefficients where the number of dimensions is and the number of points is .
None.