Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'operator': 0.03; 'integers': 0.09; 'subset': 0.09; 'cc:addr :python-list': 0.11; '(r)': 0.16; 'arbitrarily': 0.16; 'both)': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'letting': 0.16; 'precision,': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; '(the': 0.22; 'feb': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'nearly': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; '(maybe': 0.31; '(usually': 0.31; 'subject:size': 0.31; 'types.': 0.31; 'know.': 0.32; 'operations': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'pm,': 0.38; '12,': 0.39; 'supporting': 0.39; 'either': 0.39; 'numbers': 0.61; 'simply': 0.61; 'real': 0.63; 'more': 0.64; 'natural': 0.68; 'optimized': 0.68; 'day': 0.76; '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; bh=e+4rE83fUnnuZXAwzL5iaJdPIegul1UX4vnQgeIeMXo=; b=TLYaYAjRupUMw3bK/yD0TzBtBkpzZDbfD5k93IFKRYREDDWx5MAIiAUTdzZXG+6pNp qNVghMNOy0qvD1QiZUSfhWh8/IUxJKLDR+9OMv2T2l+NpARbQUJsYtSithlQwQJZR3PY Zqf5hGEf4OFWACIM/Ptj5yD/1mz+BuNcudqsk6SSN02kDXIgPUpf9xihmhX/vC4JLT9G 1JJM1Jmrjj1/sV45LQQjT/0hjMBJg9FIFL7VtkNSmBH+TzUU4XrSqPnrfrA+8lvh/0Hc Si65xzfekW1vfN649FYdR+SgyE06TnW8D8cyT/cbOqtC9P/dplNifcPVCnw2AqO45BMu 1m5Q== MIME-Version: 1.0 X-Received: by 10.68.200.74 with SMTP id jq10mr2185294pbc.169.1392192391128; Wed, 12 Feb 2014 00:06:31 -0800 (PST) In-Reply-To: <71e578f8-0d23-4b8e-b9f2-b987bdc9c01d@googlegroups.com> References: <8e4c1ab1-e65d-483f-ad9d-6933ae2052c3@googlegroups.com> <7e7d3200-a4ae-4842-ad8d-68b4435b9006@googlegroups.com> <52f219c5$0$29972$c3e8da3$5496439d@news.astraweb.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> Date: Wed, 12 Feb 2014 19:06:30 +1100 Subject: Re: Finding size of Variable From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392192393 news.xs4all.nl 2856 [2001:888:2000:d::a6]:38578 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66006 On Wed, Feb 12, 2014 at 6:49 PM, wrote: > The day you find an operator working on the set of > reals (R) and it is somehow "optimized" for N > (the subset of natural numbers), let me know. I have yet to find any computer that works with the set of real numbers in any way. Never mind optimization, they simply cannot work with real numbers. As to operations that are optimized for integers (usually not for naturals - supporting zero and negatives isn't hard), they are legion. In Python, integers have arbitrary precision, but floats, Fractions, and Decimals, don't. Nearly any operation on arbitrarily large numbers will be either more accurate or more efficient (maybe both) with integers than with any of the other types. Letting you know, that's all. ChrisA