Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:missing': 0.07; 'suggesting': 0.07; 'python': 0.08; 'integers': 0.09; 'am,': 0.12; 'binary': 0.13; 'float': 0.13; 'stored': 0.13; 'cray': 0.16; 'does,': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'identifiers': 0.16; 'infinity': 0.16; 'number?': 0.16; 'subject:Language': 0.16; 'language': 0.16; 'wrote:': 0.18; 'modified': 0.18; 'programming': 0.20; 'memory': 0.21; 'header:In- Reply-To:1': 0.22; 'asked': 0.24; 'math': 0.24; 'mainly': 0.28; 'bit': 0.28; "didn't": 0.30; 'message-id:@gmail.com': 0.31; 'does': 0.32; "isn't": 0.33; 'header:User-Agent:1': 0.33; 'integer': 0.34; 'responded': 0.34; 'to:addr:python-list': 0.35; 'however,': 0.35; 'something': 0.35; 'two': 0.36; 'received:org': 0.36; 'else,': 0.37; 'but': 0.37; 'represent': 0.37; 'received:192': 0.38; 'could': 0.38; 'should': 0.38; 'returned': 0.39; 'johnson': 0.39; 'everyone': 0.39; 'to:addr:python.org': 0.40; 'type': 0.61; 'simple': 0.61; 'believe': 0.65; 'number.': 0.66; 'subject:!': 0.66; 'designed': 0.69; 'subject:types': 0.84; 'twos': 0.84; 'wanted,': 0.84 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Fri, 24 Feb 2012 09:23:08 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.16 MIME-Version: 1.0 To: python-list@python.org Subject: Re: PyWart: Language missing maximum constant of numeric types! References: <8c2096d9-3cc2-4b64-8f11-c1d958d94243@x19g2000yqh.googlegroups.com> <3bdf4796-3a45-43db-8575-d4ba819a8229@f4g2000yqh.googlegroups.com> In-Reply-To: <3bdf4796-3a45-43db-8575-d4ba819a8229@f4g2000yqh.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1330100607 news.xs4all.nl 6848 [2001:888:2000:d::a6]:42700 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20824 On 02/24/2012 08:34 AM, Rick Johnson wrote: > Yes i could write my own implementation of INFINITY if i wanted, > although i would have returned True and False as apposed to 1 and 0 > AND used the identifiers Infinity and Infinitesimal, but i digress :- > P. > > However, INFINITY is something i believe a language should provide; > which python does, albeit inconsistently. How do you represent infinity as an binary integer number? Or are you suggesting that the integer type (class) be modified to allow an "infinity" state that really isn't a number at all (could not be stored as a integer in C)? Float is a different story because IEEE does define a binary representation of infinity in the floating-point specification. I know of no language that has any form of representation of infinity for integers mainly because there's no way to represent infinity as a standard twos-compliment binary number. In a language that deals directly with types in memory such as C, having an infinity representation would be possible but would make simple math really hard, and much slower. All this reminds me of the original cray supercomputers. They didn't use twos compliment for integers so they had two representations of zero (+0 and -0). Made programming a bit tricky. When asked why the cray didn't just do two's compliment like everyone else, Seymour Cray responded that when the computer was designed he simply didn't know about twos compliment.