With the latest CVS, test_long and test_long_future fail on Linux, because float(huge) doesn't raise OverflowError but returns inf. I'm guessing this wasn't your intention;
Interesting. Of course it wasn't my intention, but it is relying on the platform ldexp setting errno to ERANGE appropriately. Apparently glibc's does not. Worse, I see the C99 standard *never* requires a conforming libm to set errno for any call of any libm function anymore. From the C99 rationale: In C9X, errno is no longer required to be set to EDOM or ERANGE because that is an impediment to optimization. The Standard has been crafted to neither require nor preclude any popular floating-point implementation. Fucking idiots <0.01 wink>. This means none of Python's fp overflow checking anywhere is worth spit anymore, not even the CHECK macro in mathmodule.c -- to the contrary, C99 *does* require overflowing libm functions to return +- HUGE_VAL, but the CHECK macro considers that a normal (not overflow) case. Without errno to distinguish them, it's impossible to determine whether HUGE_VAL is a normal result or an overflow indicator. The 754 Cabal did their job well here (i.e., they made *portable* numeric C impossible, except across 754 boxes using C99's new 754 gimmicks). Oh well. I don't know how to fix this in general (as above, it sounds truly impossible to do so portably now, without platfrom #ifdefs). I expect I can hack something together for the specific failing tests, though (which I added specifically to find out how reliable ERANGE was -- no time like an alpha for that!).
With the latest CVS, test_long and test_long_future fail on Linux,
Would someone who normally builds on Linux please update and run these now? I expect they'll get beyond the float(huge) tests failing for Guido, but much more new stuff is tested beyond that point (which Guido never got to).
"TP" == Tim Peters
writes:
With the latest CVS, test_long and test_long_future fail on Linux, TP> Would someone who normally builds on Linux please update and run TP> these now? I expect they'll get beyond the float(huge) tests TP> failing for Guido, but much more new stuff is tested beyond that TP> point (which Guido never got to).
test_long and test_long_future both work on my Linux box. Jeremy
>> With the latest CVS, test_long and test_long_future fail on Linux, Tim> Would someone who normally builds on Linux please update and run Tim> these now? On my Mandrake 8.0 laptop I get the usual (for me) suspects: 1 test failed: test_linuxaudiodev 15 tests skipped: test_al test_cd test_cl test_dl test_gl test_imgfile test_largefile test_nis test_ntpath test_socket_ssl test_socketserver test_sunaudiodev test_unicode_file test_winreg test_winsound Those skips are all expected on linux2. S
participants (3)
-
Jeremy Hylton
-
Skip Montanaro
-
Tim Peters