next up previous contents
Next: Memory ``leaks'' Up: Odds and ends Previous: Avoiding overflow in ``schint''

Excess precision

Specifying too much precision for the eigenvalues in ``getEs'' can cause the program to get stuck in a long loop. Rather, you should use a tolerance of about 1e-12, which is both sufficiently accurate and stable. You should specify this in ``getEs'' with a statement like

                                   .
                                   .
    E[k]=zriddrp480(func_Schrodinger,E1,E2,TOL,0,Veff,r,dr,N);  
                                   .
                                   .
with TOL defined in an appropriate #define statement.



Tomas Arias
Fri Mar 3 11:23:54 EST 2000