build curiosities of svn head (on WinXP)
Fredrik Lundh
fredrik at pythonware.com
Mon Dec 26 17:58:39 EST 2005
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>
More information about the Python-list
mailing list