dingo

Joined: 17 Nov 2005 Posts: 2
|
Posted: Thu Nov 17, 2005 6:00 am Post subject: Negative zero?? |
|
|
Hello.. First post here.
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: | 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 |
it outputs this:
-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. |
|