harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-22) Double NaN should compare greater than positive infinity
Date Fri, 30 Dec 2005 15:40:02 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-22?page=all ]
     
Tim Ellison resolved HARMONY-22:
--------------------------------

    Resolution: Fixed

Fixed in the following files in luni at repo revision 360107:
 - java/lang/Float.java
 - java/lang/Double.java
 - java/util/Arrays.java


> Double NaN should compare greater than positive infinity
> --------------------------------------------------------
>
>          Key: HARMONY-22
>          URL: http://issues.apache.org/jira/browse/HARMONY-22
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Tim Ellison
>     Assignee: Tim Ellison

>
> java.lang.Double.compareTo(java.lang.Double) should answer that  Double.NaN is greater
than Double.POSITIVE_INFINITY.
> Here's a test case that demonstrates the problem:
> 	public void testDoubleCompare() {
> 		Double nonNumber = new Double(Double.NaN);
> 		Double infinity = new Double(Double.POSITIVE_INFINITY);
> 		int indicator = nonNumber.compareTo(infinity);
> 		assertEquals("Incorrect comparison result", 1, indicator);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message