[Python-ideas] PEP 485: A Function for testing approximate equality

Guido van Rossum guido at python.org
Fri Jan 23 19:10:35 CET 2015

On Fri, Jan 23, 2015 at 9:59 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> Guido's example of Newton iteration is a good use case (although most
> of the time I'd expect to use a prebuilt function from a module,
> rather than build it myself with Newton iteration, but maybe that just
> reflects the fact that I don't do numerical programming).

Well duh. Any algorithm that isn't already in the math module would require
way too much code. The point of the example is that most people have
probably seen that algorithm before, and it's only one simple step, really,
so they won't be distracted by trying to understand the algorithm when the
point of the example is to show how you would use is_close_to(). (And it's
one of the simplest algorithms that gives an *approximation*, not an exact
answer, at least not in the mathematical sense, which is also important in
this case -- if the algorithm was exact there would be no need to use

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150123/aedc19d4/attachment.html>

More information about the Python-ideas mailing list