harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Egor Pasko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2773) [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)
Date Mon, 18 Dec 2006 12:33:22 GMT
[drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)
----------------------------------------------------------------------------

                 Key: HARMONY-2773
                 URL: http://issues.apache.org/jira/browse/HARMONY-2773
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: IA32/OPT/anyOS
            Reporter: Egor Pasko


consider the following testcase:

class nan
{
    public static void main(String[] args)
    {   
        double a = -1.0d;
        double b = 0.0d;
        double c;
        double a2 = 1.0d;
        double b2 = -0.0d;
 
        c = a / b;
        if ( c == Double.NEGATIVE_INFINITY ) {
            System.out.println("test1: PASS");
        }else{
            System.out.println("test1: FAIL");
        }
 
        c = a2 / b2;
        if ( c == Double.NEGATIVE_INFINITY ) {
            System.out.println("test2: PASS");
        }else{
            System.out.println("test2: FAIL");
        }
        System.out.println(c);
    }
}

it fails on OPT, but passes on JET and Jrockit:

> $HARMONY -showversion -Xem:jet nan
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r487512, (Dec 15 2006), Linux/ia32/gcc 3.3.3, debug build
http://incubator.apache.org/harmony
test1: PASS
test2: PASS
-Infinity

> $HARMONY -showversion -Xem:opt nan
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r487512, (Dec 15 2006), Linux/ia32/gcc 3.3.3, debug build
http://incubator.apache.org/harmony
test1: FAIL
test2: FAIL
NaN

> java -showversion nan
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-linux-ia32, R25.0.0-75, GC: System
optimized over throughput (initial strategy singleparpar))

test1: PASS
test2: PASS
-Infinity



-- 
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