> I noticed that you used both "nondeterministic" and
> "reproducible" though.  

LOL.  The nondeterministic part is that the same calculation will give
different answers and there doesn't appear to be a pattern to which of
the several answers will occur.  The reproducible part is that it
happens from session-to-session

> Are the specific values significant (e.g., do
> you really need range(10000) to demonstrate the problem)?  

No, you just need to run the calculation several times at the command
line:

>>> -19400000000 * (1/100.0)
-193994880.0
>>> -19400000000 * (1/100.0)
-194000000.0
>>> -19400000000 * (1/100.0)
-194000000.0


Raymond




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 19, 2006 1:44 PM
To: Raymond Hettinger
Cc: python-dev@python.org
Subject: Re: [Python-Dev] Nondeterministic long-to-float coercion


    Raymond> My colleague got an odd result today that is reproducible
on
    Raymond> his build of Python (RedHat's distribution of Py2.4.2) but
not
    Raymond> any other builds I've checked (including an Ubuntu Py2.4.2
    Raymond> built with a later version of GCC).  I hypothesized that
this
    Raymond> was a bug in the underlying GCC libraries, but the
magnitude of
    Raymond> the error is so large that that seems implausible.  Does
anyone
    Raymond> have a clue what is going-on?

Not off the top of my head (but then I'm not a guts of the
implementation or
gcc whiz).  I noticed that you used both "nondeterministic" and
"reproducible" though.  Does your colleague always get the same result?
If
you remove the set constructor do the oddball values always wind up in
the
same spots on repeated calls?  Are the specific values significant
(e.g., do
you really need range(10000) to demonstrate the problem)?  Also, I can
never
remember exactly, but are even-numbered minor numbers in GCC releases
supposed to be development releases (or is that for the Linux kernel)?

Just a few questions that come to mind.

Skip


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to