You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This functions looks for the minimizer of a quadratic function f(x) defined over the interval [a,b] with given derivatives f'(a) and f'(b). In order to have the problem well-posed the derivatives must obey the condition f'(a)<0 and f'(b)>0.
find_quadratic_minimizer is called from lines 51 and 46 ; 51 should not pose any problem since the condition is verified explicitly, and a call from 46 guarantees two different values f(a) and f(b), and therefore the derivatives must differ.
It does seem that you are working beyond the limits of machine precision.
It is a bad idea to have this workaround. Linesearch must fail in this case. Division by zero is supposed to be checked in lines 90-98 of linesearch.cpp, it would be a good idea to investigate. Do you get an exception?
At line 40 in the linesearch.cpp code there is a divide by zero occurring.
I tried to code a work around with an if (ga == gb) statement, but don't know what the return value should be in that case. Suggestions?
The text was updated successfully, but these errors were encountered: