Is signed zero always available?

Random832 random832 at fastmail.com
Wed Jun 22 10:34:48 EDT 2016


On Wed, Jun 22, 2016, at 10:19, Grant Edwards wrote:
> 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.

AIUI, native C integers have never reliably supported signed zero even
with representations that naively seem to have it. There's no
well-defined way to detect it - no int version of copysign, for instance
- and implementations are free to erase the distinction on every
load/store or define one of them to be a trap representation.



More information about the Python-list mailing list