Routines for minimizing a function
of the variables
may require you to provide a subroutine to evaluate the second derivatives of
.
e04hdf is designed to check the second derivatives calculated by such user-supplied subroutines. As well as the routine to be checked (
h), you must supply a subroutine (
funct) to evaluate the first derivatives, and a point
at which the checks will be made. Note that
e04hdf checks routines of the form required for
e04lbf.
e04hdf first calls user-supplied subroutines
funct and
h to evaluate the first and second derivatives of
at
. The user-supplied Hessian matrix (
, say) is projected onto two orthogonal vectors
and
to give the scalars
and
respectively. The same projections of the Hessian matrix are also estimated by finite differences, giving
respectively, where
denotes the vector of first derivatives at the point in brackets and
is a small positive scalar. If the relative difference between
and
or between
and
is judged too large, an error indicator is set.
None.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
ifail is set to
if
where
is set equal to
(
being the
machine precision as given by
x02ajf) and other quantities are as defined in
Section 3.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
Suppose that it is intended to use
e04lbf to minimize
The following program could be used to check the second derivatives calculated by
h required. (The call of
e04hdf is preceded by a call of
e04hcf to check
funct which calculates the first derivatives.)
None.