harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6339) Sample test case showing Math differences
Date Wed, 09 Sep 2009 12:58:58 GMT
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

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) {
        for(int j=0; j<mk.length;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.

View raw message