[Python-Dev] Caching float(0.0)
"Martin v. Löwis"
martin at v.loewis.de
Tue Oct 3 16:10:31 CEST 2006
Nick Maclaren schrieb:
> That was the point of a previous posting of mine in this thread :-(
> You shouldn't, despite what IEEE 754 says, at least if you are
> allowing for either portability or numeric validation.
> There are a huge number of good reasons why IEEE 754 signed zeroes
> fit extremely badly into any normal programming language and are
> seriously incompatible with numeric validation, but Python adds more.
> Is there any other type where there are two values that are required
> to be different, but where both the hash is required to be zero and
> both are required to evaluate to False in truth value context?
Ah, you are proposing a semantic change, then: -0.0 will become
More information about the Python-Dev