You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2009/09/14 14:45:57 UTC
[jira] Commented: (HARMONY-6339) [classlib] [math] Sample test case
showing Math differences
[ https://issues.apache.org/jira/browse/HARMONY-6339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754962#action_12754962 ]
Tim Ellison commented on HARMONY-6339:
--------------------------------------
Invalid code reverted, and simple test case added, at repo revision r814620.
Please verify this fixes the issue.
> [classlib] [math] 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
> Assignee: Tim Ellison
>
> 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.