Mark Dickinson added the comment:

> - finally, compare the epsilons abs(y**n - x) for the initial guess
>   and improved version, returning whichever gives the smaller epsilon.
> 
> So I'm confident that nth_root() should never be worse than pow().

Same deal here: those aren't the actual errors; they're approximations to the 
errors, since the computations of the epsilons depends on (a) the usual 
floating-point rounding, and more significantly (b) the accuracy of the `y**n` 
computation. It's entirely possible that the value giving the smaller epsilon 
is actually the worse of the two approximations.

----------

_______________________________________
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