Re: Signed zeros: is this a bug?
- From: "Mark Dickinson" <dickinsm@xxxxxxxxx>
- Date: 11 Mar 2007 10:44:34 -0700
On Mar 11, 1:26 pm, a...@xxxxxxx (Alex Martelli) wrote:
[Long analysis of probable cause of the problem]
Thank you for this. I was suspecting something along these lines,
but I don't yet know my way around the source well enough to figure
out where the problem was coming from.
In the meantime, I hope that some available workarounds for the bug are
clear from this discussion: avoid using multiple constants in a single
compilation unit where one is 0.0 and another is -0.0, or, if you really
can't avoid that, perhaps use compiler.compile to explicitly build the
bytecode you need.
Yup: the workaround seems to be as simple as replacing all occurrences
of -0.0 with -(0.0). I'm embarrassed that I didn't figure this out
sooner.
(-0.0, 0.0)x, y = -(0.0), 0.0
x, y
Mark
.
- Follow-Ups:
- Re: Signed zeros: is this a bug?
- From: Alex Martelli
- Re: Signed zeros: is this a bug?
- References:
- Signed zeros: is this a bug?
- From: Mark Dickinson
- Re: Signed zeros: is this a bug?
- From: Alex Martelli
- Signed zeros: is this a bug?
- Prev by Date: Re: threading and iterator crashing interpreter
- Next by Date: Re: Python in a desktop environment
- Previous by thread: Re: Signed zeros: is this a bug?
- Next by thread: Re: Signed zeros: is this a bug?
- Index(es):