>The fact that there might be a point y such that F(y)>F(a) or
>F(y)>F(b)
>is quite irrelevent and cannot be rule out by an efficient algorithm
>unless you make stronger assumption on F (in which case using
>derivatives might be a good idea).
This is the answer. The existance of the point y is irrelevant, but
the function will fail if y is used as the first guess of the extremum.
This is what I meant, it is a useless test. If the test is passed, you
know that a minimum exists, if the test is failed you have not learned
anything. So why complain? The function complains that it could not
check that the root exists not that it does not exist. If you like the
test so much, there should be a way to force the algorithm to proceed
even it the test is failed since it does not tell you anything.
>Moreover, evaluation of F(x) is required for the Brent algorithm (or
>the
>golden section search), so there is no useless evaluation.
The x, required for golden/Brent is not just any x, it is a particular
place inside the interval (a;b). So the function call is useless.