[Python-checkins] r63553 - python/trunk/Lib/test/test_math.py

Mark Dickinson dickinsm at gmail.com
Fri May 23 15:36:22 CEST 2008


 <skip <at> pobox.com> writes:

> Doesn't that suggest that math.sum is likely to cause problems on a number
> platforms?  Should it even be included in the math module?

The tests are skipped on non IEEE 754 platforms because the tests
(rather than the math.sum code itself) are IEEE 754 specific.  The
basic algorithm, and the code, *should* be fine even on non IEEE 754
systems, provided they do some form of round-to-nearest (it
doesn't even have to be round-half-to-even).  Of course, non
IEEE 754 machines are difficult to find these days, so these
assertions are a little bit difficult to test.  But this skip seems
reasonable to me.

The skipping due to issue #2937 bothers me more.
Yes: math.sum is likely to be broken on 32-bit x86 hardware
that uses an x87-style floating-point unit, instead of using
the more modern SSE2 instructions.  Certainly if math.sum
stays then a note should be added to the docs about this.

May I direct further discussion to the bug tracker, under
issue #2819?  It's still open, and still being worked on.
I think it would be useful to have a discussion of what to do
on IA32 hardware.







More information about the Python-checkins mailing list