PPC floating equality vs. byte compilation

Andrew MacIntyre andymac at bullseye.apana.org.au
Sat Jul 9 05:25:22 EDT 2005


Donn Cave wrote:
> I ran into a phenomenon that seemed odd to me, while testing a
> build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
> 
> test_builtin.py, for example, fails a couple of tests with errors
> claiming that apparently identical floating point values aren't equal.
> But it only does that when imported, and only when the .pyc file
> already exists.  Not if I execute it directly (python test_builtin.py),
> or if I delete the .pyc file before importing it and running test_main().
> 
> For now, I'm going to just write this off as a flaky build.  I would
> be surprised if 5 people in the world care, and I'm certainly not one
> of them.  I just thought someone might find it interesting.

I have a faint recollection of seeing other references to this on other 
platforms.  That faint recollection also seems to point to it being 
something to do with the marshalling of floats (.pyc files contain 
constants in a marshalled form).  Don't think I've ever seen it myself...

-------------------------------------------------------------------------
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  (pref) | Snail: PO Box 370
        andymac at pcug.org.au             (alt) |        Belconnen ACT 2616
Web:    http://www.andymac.org/               |        Australia



More information about the Python-list mailing list