Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6807
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "OKB (not okblacke)" <brenNOSPAMbarn@NObrenSPAMbarn.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: float("nan") in set or as key |
| Date | Wed, 1 Jun 2011 17:17:54 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 36 |
| Message-ID | <Xns9EF768C113385OKB@88.198.244.100> (permalink) |
| References | <d63a1808-e704-4538-8541-9edeadab2135@glegroupsg2000goo.googlegroups.com> |
| Injection-Date | Wed, 1 Jun 2011 17:17:54 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="VBRx1jzaPYmS2Pb8loN3ww"; logging-data="15541"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18B55PnQCzFPn5L8SdmbFq4xDAu4JaV1CI=" |
| User-Agent | Xnews/5.04.25 |
| X-Face | ^]|0#B-HZs'<Jh=4_:};H$@IfIO6Iim+,QiT1)!{?fB7a,F6C2B&BL`uVDRQ}q4.j.`WeQ$Ob1YG'}99]<u,M+2fkbr?j]pMT1AdKu,0PQ"+se`oyhh7Q$u> |
| Cancel-Lock | sha1:VveJPXIa6K1fuwvvg1ZLZDsCOTo= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:6807 |
Show key headers only | View raw
Carl Banks wrote:
> On Tuesday, May 31, 2011 8:57:57 PM UTC-7, Chris Angelico wrote:
>> On Wed, Jun 1, 2011 at 1:30 PM, Carl Banks wrote:
>> > I think you misunderstood what I was saying.
>> >
>> > It's not *possible* to represent a real number abstractly in any
>> > digita
> l computer. Python couldn't have an "abstract real number" type
> even it wanted to.
>>
>> True, but why should the "non-integer number" type be floating
>> point rather than (say) rational?
>
> Python has several non-integer number types in the standard
> library. The one we are talking about is called float. If the
> type we were talking about had instead been called real, then your
> question might make some sense. But the fact that it's called
> float really does imply that that underlying representation is
> floating point.
That's true, but that's sort of putting the cart before the horse.
In response to that, one can just ask: why is this type called "float"?
Why is it that when I type 1.37 or sqrt(2) in my program, the resulting
object is a "float" rather than some other numeric type? I'm aware
that there are answers to this having to do with standardization and
efficiency. But I do sometimes wish that the "default" type for non-
integers (as created through Python expressions) was something more like
"rationals with a denominator no bigger than N".
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
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 23:09 -0700
Re: float("nan") in set or as key "OKB (not okblacke)" <brenNOSPAMbarn@NObrenSPAMbarn.net> - 2011-06-01 17:17 +0000
Re: float("nan") in set or as key Ethan Furman <ethan@stoneleaf.us> - 2011-06-01 11:10 -0700
Re: float("nan") in set or as key Chris Torek <nospam@torek.net> - 2011-06-01 18:29 +0000
csiph-web