[issue4024] float(0.0) singleton

Christian Heimes report at bugs.python.org
Fri Oct 3 14:19:46 CEST 2008


Christian Heimes <lists at cheimes.de> added the comment:

Please use copysign(1.0, fval) == 1.0 instead of your memcpy trick. It's
the cannonical way to check for negative zero. copysign() is always
available because we have our own implementation if the platform doesn't
provide one. We might also want to special case 1.0 and -1.0.

I've to check with Guido and Barry if we can get the optimization into
2.6.1 and 3.0.1. It may have to wait until 2.7 and 3.0.

----------
assignee:  -> christian.heimes
nosy: +christian.heimes
priority:  -> normal
versions: +Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4024>
_______________________________________


More information about the Python-bugs-list mailing list