The existing checks are for analytic derivatives. If you also want to
check numerical derivatives, that would certainly make sense.
I assume you mean the existing checks are "analytic checks of
derivatives" and "check derivatives numerically", right? How the
derivative is evaluated internally doesn't really matter for how we do
the checking.
But to do
this properly requires something like dfridr from Numerical Recipes. I
have not done this so far because the NR license prohibits us from
including this code directly in IMP.
The dumb way of checking the derivatives numerically that I submitted
does well enough for the functions we have now. If we need something
better later we can improve it.
In general, we don't really care that the values of the derivatives
are exactly correct as they are just used to approximate the shape of
the function, just that they are more or less right.