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

Chris Barker chris.barker at noaa.gov
Fri Feb 6 01:56:58 CET 2015


On Thu, Feb 5, 2015 at 4:40 PM, Chris Angelico <rosuav at gmail.com> 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?
>
> Because 'float' is the one obvious way to handle non-integral numbers
> in Python. If you simply put "x = 1.1" in your code, you get a float,
>

Fair enough -- more to the point -- we HAVE floats because we want folks to
be able to use a wide range of values -- once we have that, we can't count
on users generally only using a small part of that range.

-Chris


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150205/3ea39369/attachment.html>


More information about the Python-ideas mailing list