Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Is signed zero always available? Date: Wed, 22 Jun 2016 14:19:32 +0000 (UTC) Lines: 21 Message-ID: References: <576a925f$0$1597$c3e8da3$5496439d@news.astraweb.com> X-Trace: news.uni-berlin.de HTL7oteBSr1JqNcmiJFJFgUwDLNR1yK3XLT4mFXdpvBw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'float': 0.05; 'implements': 0.07; 'integers': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:qwest.net': 0.09; 'python': 0.10; '(but': 0.15; '(there': 0.16; 'distinct': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'value.)': 0.16; 'wrote:': 0.16; 'platforms': 0.18; 'signed': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'decimal': 0.29; "d'aprano": 0.33; "he's": 0.33; 'int': 0.33; 'steven': 0.33; 'values.': 0.33; 'should': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'two': 0.37; 'received:org': 0.37; 'available.': 0.37; 'to:addr:python.org': 0.40; 'where': 0.40; 'back': 0.62; 'guaranteed': 0.67; 'subject:available': 0.79; 'subject:always': 0.84; 'blood': 0.91; 'edwards': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 67-130-15-94.dia.static.qwest.net User-Agent: slrn/1.0.2 (Linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <576a925f$0$1597$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:110316 On 2016-06-22, Steven D'Aprano wrote: > Both IEEE-754 floats and Decimals support signed zeroes, that is -0.0 and > 0.0 are two distinct (but equal) values. > > (There is only one int zero: -0 and 0 are the same value.) Is that guaranteed by Python, or just a side-effect of the implementation? Back in the days when Python used native C integers I think the latter. Now that Python implements it's own arbitrary-length ints, it may be the former. > Signed Decimal zero should always be available. What about signed float > zero? Are there any platforms where Python is available that don't support > signed zeroes? -- Grant Edwards grant.b.edwards Yow! This ASEXUAL PIG at really BOILS my BLOOD gmail.com ... He's so ... so ... URGENT!!