PPC floating equality vs. byte compilation
Terry Reedy
tjreedy at udel.edu
Sat Jul 9 16:04:55 EDT 2005
"Tim Peters" <tim.peters at gmail.com> wrote in message
news:1f7befae05070908227704f21 at mail.gmail.com...
> [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
More information about the Python-list
mailing list