David Murmann wrote: > here i have problems. some tests fail more or less randomly. > after some testing, i found that it seems to be related to > the parsing of float literals in python code (wild guess). > for example, test_pow failed giving me this traceback: > > Traceback (most recent call last): > File > "D:\develop\cygwin\usr\local\src\python\python\trunk\lib\test\test_pow.py > ", line 109, in test_bug705231 > eq(pow(a, 1.23e167), 1.0) > AssertionError: -1.0 != 1.0 > > this seems very strange to me, as i get this on the interactive > prompt: > >>> pow(-1.0, 1.23e167) > 1.0
sounds like some odd locale problem. consider >>> pow(-1.0, 1) -1.0 > another example is test_colorsys. this test hangs, because it > uses "frange(0.0, 1.0, 0.2)" (which does, what it looks like), > but the 0.2 is somehow read as 0.0 resulting in an infinite > loop. and frange(0, 1, 0) try setting the locale (via the locale module) from the interactive prompt, and see if Python still handles floating point values correctly. </F> -- http://mail.python.org/mailman/listinfo/python-list