Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(even': 0.05; 'cpython': 0.05; 'scaling': 0.07; 'integers': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; '23,': 0.16; 'arbitrarily': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'infinity': 0.16; 'sure.': 0.16; 'thereabouts.': 0.16; 'wrote:': 0.18; 'library': 0.18; 'bit': 0.19; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'format,': 0.24; 'integer': 0.24; 'helpful': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'gives': 0.31; '(including': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'thanks': 0.36; 'subject:?': 0.36; 'wrong': 0.37; 'being': 0.38; 'christian': 0.38; 'pm,': 0.38; 'cost.': 0.60; 'numbers': 0.61; 'worth': 0.66; 'believe': 0.68; 'concept.': 0.84; 'difference.': 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; bh=ZPuGJN1wnZA4mr477iKDmzQm55ZRmLDMrK9LoFBMJ68=; b=dIHWxlHhVJaplqecS+/BSlCN4HORhsdfrgoVBe7H3w4XffqpmnHw0d0PJQZLiEYIAY BUeZP4bO2riOPattDoUTvYVTCet3ar7Zsy/AWRvY8yrwYZ9OPpWWSI50POcK3NMtkbkk OOftqSRUj/uddWYyhhpZbKLOaD5+heoOJjziIl3/x3PGSWFr305C56enXN5UQ9lm3fML NoS/dX6FxmA8+6kar1eX3DuZmLCavD2g7W3B14g09ihW73N+NPB+hBR5eGw1LxVr5WHm TDRQqBfpt4kexzd8T0huttxve4iPZTi9YaQzdjJM/S4JCuOJTQjpKK5ZMx8N+Gvm9tQc WpnA== MIME-Version: 1.0 X-Received: by 10.66.102.39 with SMTP id fl7mr7032929pab.43.1390469778657; Thu, 23 Jan 2014 01:36:18 -0800 (PST) In-Reply-To: References: Date: Thu, 23 Jan 2014 20:36:18 +1100 Subject: Re: No overflow in variables? 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390469782 news.xs4all.nl 2967 [2001:888:2000:d::a6]:46880 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64587 On Thu, Jan 23, 2014 at 8:14 PM, Christian Heimes wrote: > On 22.01.2014 19:26, Chris Angelico wrote: >> Internally, I believe CPython uses the GNU Multiprecision Library >> (GMP), which gives an efficient representation and operation format, >> scaling to infinity or thereabouts. You can go to any size of integer >> you like without there being any difference. There's a cost to that >> (even small integers are a bit slower to work with), but it's SO >> helpful to be able to work with arbitrarily large numbers that it's >> worth that cost. > > Small correction: Python isn't using GMP. Python uses its own > implementation. Okay, wasn't sure. I've seen others that use GMP (including Pike, which can also use arbitrary-precision floats if you wish). Wrong in the specifics, right in the concept. Thanks for the correction. ChrisA