It seems there is a redundant semicolon in your script:
-----------------------------
for (H=Ht, step=1; abs(step)>1E-15; H=H-step) {
step=(a*H*H*H+b*H*H+c*H+d) / (3*a*H*H+2*B*H+c) ; } ;
------------------------------
It should be changed as:
-----------------------------
for (H=Ht, step=1; abs(step)>1E-15; H=H-step) {
step=(a*H*H*H+b*H*H+c*H+d) / (3*a*H*H+2*B*H+c) ; }
------------------------------
Sam
OriginLab Technical Services