next up previous contents
Next: Debugging Up: ``getEs'' Previous: New routine

Fixing ``zriddrp480''

The numerical recipes routine ``zriddr'' also has a small bug: For wildly varying functions such as ``func_Schrodinger'', zriddr sometimes returns too early. To fix this, replace the code fragment

if (fabs(xnew-ans) <= xacc) ... ,
in ``zriddrp480'' with
if (fabs(xl-xh) <= xacc) ... .


Tomas Arias
Tue Feb 22 15:12:08 EST 2000