PPT Slide
var i; sml; bfgs_calls; nfix; max_calls
sml = 1.e-4 % Gradient threshlod.
bfgs_calls = 1000 % Number of BFGS calls.
max_calls = 10000 % Max. calls to spend.
if abs[grad[i]] <= sml then
display 'Gradient below threshold...'
when pcount < max_calls just move to again
display 'We probably failed...'