[SciPy-Dev] Comments on optimize.newton function

Gökhan Sever gokhansever at gmail.com
Sun May 22 16:46:38 EDT 2011


On Sun, May 22, 2011 at 12:00 PM, Charles R Harris <charlesr.harris at gmail.com>
> cpdef double petters_solve_for_rw(double x, double rd, double rh):
>    return rh*kappa*y**3 - (exp(y*kelvin/rd) - rh) * (1 - y**3)

This last modification is converging faster than the original version,
but readability of the function is reduced now.

>
>
>
> where x = rd/y. The last might allow you to bracket things fairly easily,
> i.e., (exp(y*kelvin/rd) - rh) * (1 - y**3) has to be >0 if you expect y>0

"rh" also plays role in determining the sign of the right portion of
this equation. Throughout the model rh usually goes from 0.95 and pass
beyond 1.0. This causes a sign change.

>
> <snip>
>
> Chuck
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>



-- 
Gökhan



More information about the SciPy-Dev mailing list