harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (HARMONY-2873) [drlvm][jit][opt] frem and drem instructions return incorrect result when divisor is Float/Double MIN_VALUE
Date Mon, 28 May 2007 05:33:16 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Varlamov reopened HARMONY-2873:
--------------------------------------

      Assignee: Alexey Varlamov

Reproduced on Win@x64, reopening:

  <testcase classname="org.apache.harmony.drlvm.tests.regression.H2873.RemTest" name="testDcmp"
time="0.188">
    <failure message="expected:&lt;0.0&gt; but was:&lt;NaN&gt;" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError:
expected:&lt;0.0&gt; but was:&lt;NaN&gt;
	at org.apache.harmony.drlvm.tests.regression.H2873.RemTest.testDcmp(RemTest.java:11)
	at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
</failure>
  </testcase>
  <testcase classname="org.apache.harmony.drlvm.tests.regression.H2873.RemTest" name="testFrem"
time="0.015">
    <failure message="expected:&lt;0.0&gt; but was:&lt;NaN&gt;" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError:
expected:&lt;0.0&gt; but was:&lt;NaN&gt;
	at org.apache.harmony.drlvm.tests.regression.H2873.RemTest.testFrem(RemTest.java:18)
	at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
</failure>
  </testcase>


> [drlvm][jit][opt] frem and drem instructions return incorrect result when divisor is
Float/Double MIN_VALUE
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2873
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2873
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux and Windows
>            Reporter: Vera Petrashkova
>            Assignee: Alexey Varlamov
>
> The following test demonstrates that frem and drem instructions return incorrect result
when divisor
> is correspondently Float or Double MIN_VALUE. The result equals to dividend.
> This issue is reproducible only on Jitrino/OPT.
> On  interpreter and on Jitrino/JET result is equal to 0.0.
> ---------------------test.java---------------
> public class test {
>     public static void main(String[] args) {
>         float f1 = 5.5f;
>         float f2 = Float.MIN_VALUE;
>         float ff = f1 % f2;
>         System.out.println( ff == 0.0f ? 
>                        "Float test passed. "+f1+" % "+f2+" = "+ff : 
>                        "Float test failed. "+f1+" % "+f2+" = "+ff +" instead of 0.0"
);
>         double d1 = 3.3d;
>         double d2 = Double.MIN_VALUE;
>         double dd = d1 % d2;
>         System.out.println( dd == 0.0d ? 
>                        "Double test passed. "+d1+" % "+d2+" = "+dd : 
>                        "Double test failed. "+d1+" % "+d2+" = "+dd +" instead of 0.0"
);
>     }
> }
> ------------------------
> Output is:
> Float test failed. 5.5 % 1.4E-45 = 5.5 instead of 0.0
> Double test failed. 3.3 % 4.9E-324 = 3.3 instead of 0.0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message