I noticed an odd bug in luaplayer while working on my complex number calculator. Someone must have surely noticed this, but I've tried searching and I've not found anything.
According to Luaplayer, -1*0 = -0..
Here's the code I've tested it with:
Code: Select all
zero = 0*-1
screen:fillRect(0,0,480,272,Color.new(0,0,0))
screen:print(200,100,tostring(zero),Color.new(255,255,255))
screen:print(200,110,tostring(zero == 0), Color.new(255,255,255))
screen:flip()
while true do
screen.waitVblankStart()
end
-0
true
which I guess means -0 has a different value to 0, but is still equal to it.
I'm using user-mode lua (for 2.0 fw) and I've also tested it on the luaplayer for windows alpha.