/*
* Exercise bisect on a few simple functions. Comparison is based
* on CPU time and on number of function evaluations.
*/
batch("d:\\paul\\paper\\bentevfn.mac");
batch("d:\\paul\\paper\\bisect.mac");
do_verbose:false$
bfprint_precision:5$
bfprecision:50$
tolerance:1.b-40$
bisection_indep_toler:1.b-40$
brent_itmax:500$
bent_itmax:500$
timer(bisect);
funclist:[func1,func2,func3,func4,func5,case1,case2,case3,case4]$
for funclistelem in funclist do (
l0:funclowlist[funclistelem],
h0:funchighlist[funclistelem],
starttime:get('bisect,'runtime),
ans:bisect(funclistelem,l0,h0),
bisecttime:get('bisect,'runtime)-starttime,
print(funclistelem, ans, num_bisect_func_evals, bisecttime),
0)$