This question may be better asked on python-list than python-dev.
One likely cause is the implementation of integer multiplication, which
uses floating point arithmetic to determine whether the result of the
multiplication overflows or is implicitly converted to long. I am
guessing that that your system probably doesn't have hardware floating
If this is true, you could usefully replace the code by a custom
32x32->64 multiply and slightly modified test, or anything else that
still does the right thing. (python 2.1 seems to use a different method
that only uses integers, you might steal that instead)
This code is at least in intobject.c and may be inlined in ceval.c for
the BINARY_MULTIPLY opcode.