Date: Thu, 05 Nov 1998 23:20:08 +0900 From: SHUDOH Kazuyuki <shudoh@muraoka.info.waseda.ac.jp> To: freebsd-java@FreeBSD.ORG Subject: A bug in mod operations of 64bit integer Message-ID: <199811051420.XAA06107@cafe.muraoka.info.waseda.ac.jp>
index | next in thread | raw e-mail
Did anyone notice a behavior which differs from JDK for SunOS 5?
This maybe a bug of FreeBSD port of JDK.
=====
class inttest {
static public void main(String s[]) {
long a, b;
a = -1111123;
b = -1123;
System.out.println(a % b);
System.out.println(b % a);
a = 11123;
b = -123;
System.out.println(a % b);
System.out.println(b % a);
a = -1111123;
b = 1123;
System.out.println(a % b);
System.out.println(b % a);
}
}
=====
We'll see on SunOS 5 and Linux:
-476
-1123
53
-123
-476
1123
But on FreeBSD and JDK 1.1.6 V98-9-23:
476
1123
-53
-123
-476
-1123
Kazuyuki SHUDO Happy Hacking!
Muraoka Lab., Grad. School of Sci. & Eng., Waseda Univ.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811051420.XAA06107>
