Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6777
| References | <mailman.2249.1306724043.9059.python-list@python.org> <c815dbe7-2952-45b9-829a-1f079fe602b9@glegroupsg2000goo.googlegroups.com> |
|---|---|
| Date | 2011-06-01 13:05 +1000 |
| Subject | Re: float("nan") in set or as key |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2351.1306897552.9059.python-list@python.org> (permalink) |
On Wed, Jun 1, 2011 at 12:59 PM, Carl Banks <pavlovevidence@gmail.com> wrote: > On Sunday, May 29, 2011 7:53:59 PM UTC-7, Chris Angelico wrote: >> Okay, here's a question. The Python 'float' value - is it meant to be >> "a Python representation of an IEEE double-precision floating point >> value", or "a Python representation of a real number"? > > The former. Unlike the case with integers, there is no way that I know of to represent an abstract real number on a digital computer. This seems peculiar. Normally Python seeks to define its data types in the abstract and then leave the concrete up to the various implementations - note, for instance, how Python 3 has dispensed with 'int' vs 'long' and just made a single 'int' type that can hold any integer. Does this mean that an implementation of Python on hardware that has some other type of floating point must simulate IEEE double-precision in all its nuances? I'm glad I don't often need floating point numbers. They can be so annoying! Chris Angelico
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: float("nan") in set or as key Carl Banks <pavlovevidence@gmail.com> - 2011-05-31 19:59 -0700
Re: float("nan") in set or as key Chris Angelico <rosuav@gmail.com> - 2011-06-01 13:05 +1000
Re: float("nan") in set or as key Grant Edwards <invalid@invalid.invalid> - 2011-06-01 14:03 +0000
Re: float("nan") in set or as key Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-02 01:10 +0000
csiph-web