Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #110316
| From | Grant Edwards <grant.b.edwards@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Is signed zero always available? |
| Date | 2016-06-22 14:19 +0000 |
| Message-ID | <mailman.38.1466605183.11516.python-list@python.org> (permalink) |
| References | <576a925f$0$1597$c3e8da3$5496439d@news.astraweb.com> <nke6pk$fjm$1@ger.gmane.org> |
On 2016-06-22, Steven D'Aprano <steve@pearwood.info> 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!!
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is signed zero always available? Steven D'Aprano <steve@pearwood.info> - 2016-06-22 23:27 +1000
Re: Is signed zero always available? Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-22 14:19 +0000
Re: Is signed zero always available? Random832 <random832@fastmail.com> - 2016-06-22 10:34 -0400
Re: Is signed zero always available? Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-22 14:59 +0000
Re: Is signed zero always available? Christopher Reimer <christopher_reimer@icloud.com> - 2016-06-22 15:50 -0700
Re: Is signed zero always available? Steven D'Aprano <steve@pearwood.info> - 2016-06-23 11:16 +1000
Re: Is signed zero always available? Michael Selik <michael.selik@gmail.com> - 2016-06-23 00:34 +0000
Re: Is signed zero always available? Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-23 02:48 +0000
csiph-web