From:
[email protected]
Package: sablevm
Version: 1.1.6-2
Severity: important
Since some free Java virtual machines started to appear in testing, I began
to learn Java. Unfortunately, when I try to compile a small program given
in my textbook, I got a strange result when using sablevm. Here is what I
get:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Script started on Tue Aug 17 00:28:24 2004
rbrito@chagas:~/src$ sablevm --no-copyright Precision
l = 9223372036854775807
d = 9.223372036854776E18
l2 = -9223372036854775808
rbrito@chagas:~/src$ kaffe Precision
l = 9223372036854775807
d = 9.223372036854776E18
l2 = 9223372036854775807
rbrito@chagas:~/src$
Script done on Tue Aug 17 00:28:45 2004
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I compiled the code with jikes-sablevm. I think that the result that kaffe gives is the correct one.
I'm attaching the source file of Precision.java with this mail.
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-6
Locale: LANG=C, LC_CTYPE=C
Versions of packages sablevm depends on:
ii java-common 0.22 Base of all Java packages
ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an ii libpopt0 1.7-4 lib for parsing cmdline parameters ii libsablevm1 1.1.6-2 Free implementation of JVM second ii unzip 5.51-2 De-archiver for .zip files
-- no debconf information
class Precision {
public static void main(String[] args) {
long l=0x7fffffffffffffffL;
double d=l;
long l2=(long)d;
System.out.println("l = " + l);
System.out.println("d = " + d);
System.out.println("l2 = " + l2);
}
}
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)