[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-cp] [bugs #9895] double to int conversion problem
From: |
Tom Tromey |
Subject: |
[commit-cp] [bugs #9895] double to int conversion problem |
Date: |
Mon, 16 Aug 2004 23:20:57 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308 |
This mail is an automated notification from the bugs tracker
of the project: classpath.
/**************************************************************************/
[bugs #9895] Latest Modifications:
Changes by:
Tom Tromey <address@hidden>
'Date:
Tue 08/17/2004 at 03:16 (America/Denver)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Invalid
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
I'm closing this bug as it is almost certainly a
bug in the VM and not in Classpath.
/**************************************************************************/
[bugs #9895] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9895>
Project: classpath
Submitted by: David Gilbert
On: Wed 08/04/2004 at 23:26
Category: None
Severity: 5 - Average
Resolution: Invalid
Assigned to: None
Status: Closed
Platform Version: None
Summary: double to int conversion problem
Original Submission: While writing some testing code for the
java.awt.Dimension class, I noticed a strange behaviour in the conversion of
double values to int values. The problem is reproduced by the following code:
public class DoubleToIntTest {
public static void main(String args[]) {
double v = Integer.MAX_VALUE + 100000.0;
System.out.println((int) v);
Double d = new Double(v);
System.out.println(d.intValue());
}
}
With Classpath (fairly recent CVS) running on JamVM 1.1.4 (on SuSE 9.1), I see
the following output:
-2147483648
-2147483648
Using Sun's JDK 1.4, the output is:
2147483647
2147483647
Follow-up Comments
------------------
-------------------------------------------------------
Date: Tue 08/17/2004 at 03:16 By: tromey
I'm closing this bug as it is almost certainly a
bug in the VM and not in Classpath.
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9895>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/