harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6339) Sample test case showing Math differences
Date Mon, 14 Sep 2009 12:02:57 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754944#action_12754944
] 

Tim Ellison commented on HARMONY-6339:
--------------------------------------

Math.floor(3.7314645675925406E19)

On RI
  java version "1.5.0_19"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02)
  Java HotSpot(TM) Client VM (build 1.5.0_19-b02, mixed mode)
  
gives
  3.7314645675925406E19

On Harmony
  Apache Harmony Launcher : (c) Copyright 1991, 2009 The Apache Software Foundation or its
licensors, as applicable.
  java version "1.5.0"
  Apache Harmony (1.5.0)
  DRLVM (11.2.0)
  pre-alpha : not complete or compatible
  svn = r808406, (Aug 27 2009), Windows/ia32/msvc 1310, release build
  http://harmony.apache.org

gives
  9.223372036854776E18


> Sample test case showing Math differences
> -----------------------------------------
>
>                 Key: HARMONY-6339
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6339
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Sebb
>
> Below is a simple test case which works in the Sun Java 1.5 but fails in Harmony.
> This is derived from the HyperGeometricDistribution test, but is hopefully a bit easier
to debug.
> import org.apache.commons.math.util.MathUtils;
> public class HarmMath {
>     private static void bcl(int m, int x, double exp){
>         final double logmx = MathUtils.binomialCoefficientLog(m, x);
>         System.out.println(m+","+x+"="+logmx+" "+(logmx==exp?" == ":" != ")+" "+exp);
>     }
>     public static void main(String[] args) {
>         int[][]mk={{101,84},{101,83},{101,60},{101,18},{101,17}};
>         double[]r={43.52547252799755,45.065917568944705,65.69211086727145,45.065917568944705,43.52547252799755};
>         for(int j=0; j<mk.length;j++){
>             bcl(mk[j][0],mk[j][1],r[j]);
>         }
>     }
> }
> The cases 101,83; 101,60; and 101,18 generate different results on Harmony.

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