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

Nathaniel Smith njs at pobox.com
Fri Feb 6 02:07:46 CET 2015


On Thu, Feb 5, 2015 at 4:24 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> If we really believe that almost all people will be working with numbers of
> around a magnitude of 1, then we could set a default -- by why in the world
> are you using floating point numbers with a range of about 1e-300 to 1e300
> in that case?

It's an observable fact, though, that people generally do take care to
ensure that their numbers are within a few orders of magnitude of 1,
e.g. by choosing appropriate units, log-transforming, etc.

You could just as reasonably ask why in the world SI prefixes exist
when we have access to scientific notation. And I wouldn't know the
answer :-). But they do!

-n

-- 
Nathaniel J. Smith -- http://vorpus.org


More information about the Python-ideas mailing list