"Tim Peters" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [Donn Cave] >> 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().
This is a known problem with marshalling INFs and/or NANs. *This* has supposedly been fixed for 2.5. We are assuming that the failure you report is for real floats. > It would be most helpful to open a bug report, with the output from > failing tests. And assign to Tim. >In general, this can > happen if the platform C string<->float routines are so poor that > > eval(repr(x)) != x ... > The ultimate cause is most likely in the platform C library's > string<->float routines (sprintf, strtod, that kind of thing). It would also be helpful if you could do some tests in plain C (no Python) testing, for instance, the same values that failed. Hardly anyone else can ;-). If you confirm a problem with the C library, you can close the report after opening, leaving it as a note for anyone else working with that platform. Terry J. Reedy -- http://mail.python.org/mailman/listinfo/python-list