Numeric root-finding in Python

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Feb 12 17:53:15 EST 2012


On 2012年2月12日 13:52:48 +0000, Robert Kern wrote:
> I don't have any advice for fixing your code, per se, but I would just
> grab mpmath and use their lambertw function:

That's no fun!
I'd never see mpmath before, it looks like it is worth investigating. 
Nevertheless, I still intend working on my lambert function, as it's a 
good learning exercise.
I did look into SciPy's lambert too, and was put off by this warning in 
the docs:
"In some corner cases, lambertw might currently fail to converge"
http://docs.scipy.org/doc/scipy/reference/generated/
scipy.special.lambertw.html
Naturally I thought "I can do better than that". Looks like I can't :)
-- 
Steven


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /