[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Negative zero value
- From: "Andy Stark" <astark@...>
- Date: Fri, 28 Apr 2006 14:18:41 +0100
I've just written a quick Lua script to look at the permutation expression
I mentioned in the thread about obfuscating Lua bytecode. The first
iteration of the loop executes as
(0 * 13) % 38
The value is zero, of course, but it prints out as -0! It turns out that
zero mod anything gives -0 as a result. Bug or feature? (It's on MacOSX
10.3 PPC if that makes any difference.)
&.
#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by NetIQ MailMarshal.
The Blackpool Sixth Form College.
#####################################################################################