[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: bug, -0 is not evaluated correctly.
- From: David Jones <drj@...>
- Date: Thu, 6 Jan 2005 09:54:48 +0000
There is a minor bug in the way that the constant -0 is evaluated.
Obviously this only applies on platforms using something like IEC 60559
arithmetic (aka IEEE). Like Mac OS X, which is what I use.
The lua statement "print(1/-0<0)" prints "false". Compare that with
"x=0;x=-x;print(1/x<0)" which prints "true".
Would you like me to look into a patch? I haven't investigated where
this goes wrong at all yet. Thinks... perhaps it is not possible to
correct this without non-portable code.
For the record I'm using
Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
on Mac OS X 10.3.7