<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have found that Math.round() returns a large
negative number instead of returning the rounded version of the argument.
</FONT><FONT face=Arial size=2>I am using Kaffe version 1.0.7.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is a test program that illustrates the
problem:</FONT></DIV>
<DIV><FONT face=Arial size=2>public class HelloWorld<BR>{<BR> public
static void main(String[] args)<BR> {<BR>
System.out.println("Hello World");</FONT></DIV>
<DIV><FONT face=Arial size=2>
System.out.print("Math.round(100D) = ");<BR>
System.out.println(Math.round(100D));</FONT></DIV>
<DIV><FONT face=Arial size=2>
System.out.print("Math.floor(100D) = ");<BR>
System.out.println(Math.floor(100D));<BR> }<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is the output from running this
program:</FONT></DIV>
<DIV><FONT face=Arial size=2>$ /usr/local/kaffe/bin/kaffe HelloWorld<BR>Hello
World<BR>Math.round(100D) = -9223372036854775808<BR>Math.floor(100D) =
100.0<BR>$ </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is the output when I use "Sun Java 1.3.0_02"
to run it:</FONT></DIV>
<DIV><FONT face=Arial size=2>$ java HelloWorld<BR>Hello
World<BR>Math.round(100D) = 100<BR>Math.floor(100D) = 100.0<BR>$ </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>