I had the same issue when I was converting the code into C#. I had to use
"System.UInt32" because the high bit is always treated as the sign, as you
mention. This is mainly a problem when bit-shifting, as I recall.
I also encountered issues with Java Byte, which has to be "System.SByte" in
C#. Can't remember exactly what issues were caused by that difference. But I
did have to change the type for .NET. I will probably have to do some
additional testing in the forked version to make sure I got all that right.
I don't have the time right now to provide more details. But the issues were
very pronounced in a language (or VM) conversion scenario, as one might
From: ECJ Evolutionary Computation Toolkit
[mailto:[log in to unmask]] On Behalf Of Sean Luke
Sent: Friday, December 02, 2011 4:45 PM
To: [log in to unmask]
Subject: Minor bug in Parity -- some help?
I'm too tired to figure out why Parity with 31 bits (the maximum) doesn't
operate right but with < 31 bits it's great. I'm sure it's a Java
signedness issue. Can anyone help out?