You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Egor Pasko (JIRA)" <ji...@apache.org> on 2006/12/18 13:33:22 UTC

[jira] Created: (HARMONY-2773) [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)

[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

        

[jira] Commented: (HARMONY-2773) [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)

Posted by "Igor V Chebykin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474969 ] 

Igor V Chebykin commented on HARMONY-2773:
------------------------------------------

Please close the issue, I havn't rights.

> [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-2773
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-2773) [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov closed HARMONY-2773.
------------------------------------

    Resolution: Fixed

Added the regression test added at r217161, closing.

> [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-2773
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2773
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: IA32/OPT/anyOS
>            Reporter: Egor Pasko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-2773.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2773) [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)

Posted by "Igor V Chebykin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor V Chebykin updated HARMONY-2773:
-------------------------------------

    Attachment: HARMONY-2773.patch

Regression test adding patch


> [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-2773
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2773
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: IA32/OPT/anyOS
>            Reporter: Egor Pasko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-2773.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2773) [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474996 ] 

Alexey Varlamov commented on HARMONY-2773:
------------------------------------------

Igor, before we abandon this issue,
could you please create a regression test for this?

> [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-2773
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2773
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: IA32/OPT/anyOS
>            Reporter: Egor Pasko
>         Assigned To: Alexey Varlamov
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-2773) [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-2773:
----------------------------------------

    Assignee: Alexey Varlamov

> [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-2773
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2773
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: IA32/OPT/anyOS
>            Reporter: Egor Pasko
>         Assigned To: Alexey Varlamov
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2773) [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)

Posted by "Igor V Chebykin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474965 ] 

Igor V Chebykin commented on HARMONY-2773:
------------------------------------------

The bug is not reproducible.
I am going to close the issue.

> [drlvm][jit][opt] negative zero is handled as positive zero (by Jitrino.OPT)
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-2773
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.