Tim Peters added the comment:

BTW, add this other way of writing a native-precision Newton step to see that 
it's much worse (numerically) than writing it in the "guess + small_correction" 
form used in roots.py.  Mathematically they're identical, but numerically they 
behave differently:


def native2(x, n):
    g = x**(1.0/n)
    if g**n == x:
        return g
    return ((n-1)*g + x/g**(n-1)) / n

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27761>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to