Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'position,': 0.05; 'falls': 0.09; 'false.': 0.09; 'subject:set': 0.09; 'subset': 0.09; 'type,': 0.09; 'cc:addr:python-list': 0.11; 'finney': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'imo,': 0.16; 'numbers;': 0.16; 'sense,': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'all,': 0.19; 'feb': 0.22; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'integer': 0.24; 'large,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; '[1]': 0.29; 'words': 0.29; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'that.': 0.31; 'subject:numbers': 0.31; 'writes:': 0.31; "we're": 0.32; 'subject:the': 0.34; 'could': 0.34; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'two': 0.37; 'clear': 0.37; 'ben': 0.38; 'handle': 0.38; 'pm,': 0.38; 'rather': 0.38; 'short': 0.38; 'expect': 0.39; '12,': 0.39; 'extremely': 0.39; 'sure': 0.39; 'read': 0.60; 'course.': 0.60; 'number,': 0.60; 'numbers': 0.61; 'skip:* 10': 0.61; 'course': 0.61; "you're": 0.61; 'real': 0.63; 'more': 0.64; 'different': 0.65; 'here': 0.66; 'url:search': 0.81; '"real': 0.84; '*does': 0.84; 'ridiculously': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=tfJkrGoShnjfaq86/mLKaCdS+6VLn1zICT3G28KA9Oo=; b=GfM6Ec59fXbj6T3cTtIphrnQvAx3rEiXjzyDZbi9ONdmGfDkLHWgvMLrgUt142TkT+ L3GP4A20cFcKskpt0WDXveJ2jbnmYfC1TalCdbYg4S51IcJxcdsIvQUuTQK86OqPFNmb eRjKbshuydlWAMlXg8PqozXoa49rJve9usA2dkDHUn5+mpSq2UgB7ADYkc1u06cRdkEh +61qwj2B0TgfItti2UgceRp9FdhXVg92+/dT7/ztHGnzhJPDshFcg7FGcQRooI9JjIxI 8jDiKhoh9FSu+CXsg7xHc5XYtkFToJjvzkER5SmaY0MWm78IAnTS6S2JBE2dw1CkhuRD s0Tw== MIME-Version: 1.0 X-Received: by 10.66.160.2 with SMTP id xg2mr38553565pab.23.1392206331497; Wed, 12 Feb 2014 03:58:51 -0800 (PST) In-Reply-To: <854n44blo9.fsf@benfinney.id.au> References: <8e4c1ab1-e65d-483f-ad9d-6933ae2052c3@googlegroups.com> <888bd2fc-54b0-4c46-9d7b-d81d01a78b52@googlegroups.com> <52f59aeb$0$29972$c3e8da3$5496439d@news.astraweb.com> <7cc8f49d-a4c7-48c2-a0af-ac58c847d794@googlegroups.com> <71e578f8-0d23-4b8e-b9f2-b987bdc9c01d@googlegroups.com> <85r478bv99.fsf_-_@benfinney.id.au> <85ioskbtfm.fsf@benfinney.id.au> <85eh38bq5z.fsf@benfinney.id.au> <854n44blo9.fsf@benfinney.id.au> Date: Wed, 12 Feb 2014 22:58:51 +1100 Subject: Re: Working with the set of real numbers From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392206334 news.xs4all.nl 2848 [2001:888:2000:d::a6]:51689 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66030 On Wed, Feb 12, 2014 at 10:44 PM, Ben Finney w= rote: > Chris Angelico writes: > >> On Wed, Feb 12, 2014 at 9:07 PM, Ben Finney = wrote: >> > That's why I think you need to be clear that your point isn't >> > =E2=80=9Ccomputers don't work with real numbers=E2=80=9D, but rather = =E2=80=9Ccomputers work >> > only with a limited subset of real numbers=E2=80=9D. >> >> Hmm, I'm not sure that my statement is false. If a computer can work >> with "real numbers", then I would expect it to be able to work with >> any real number. > > Likewise, if you claim that a computer *does not* work with real > numbers, then I would expect that for any real number, the computer > would fail to work with that number. > > Which is why neither of those is a good statement of your position, IMO, > and you're better off saying the *limitations* you're describing. I think we're using different words to say the same thing here :) What I mean is that one cannot accurately say that a computer works with real numbers, because it cannot work with them all. Of course a computer can work with _some_ real numbers; but only some. (An awful lot of them, of course. A ridiculously huge number of numbers. More numbers than you could read in a lifetime! While the number is extremely large, it still falls pitifully short of infinity.[1]) And so we do have optimizations for some subset of reals: in approximate order of performance, an arbitrary-precision integer type, a limited precision floating point type, and two types that handle fractions (vulgar and decimal). They're all, in a sense, optimizations. In pure theory, we could have a single "real number" type and do everything with that; all the other types are approximations to that. [1] http://tools.ietf.org/search/rfc2795