Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 58674 invoked from network); 14 Sep 2009 12:03:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Sep 2009 12:03:22 -0000 Received: (qmail 75976 invoked by uid 500); 14 Sep 2009 12:03:22 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 75943 invoked by uid 500); 14 Sep 2009 12:03:22 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 75934 invoked by uid 99); 14 Sep 2009 12:03:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 12:03:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 12:03:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 85A31234C045 for ; Mon, 14 Sep 2009 05:02:57 -0700 (PDT) Message-ID: <26957445.1252929777531.JavaMail.jira@brutus> Date: Mon, 14 Sep 2009 05:02:57 -0700 (PDT) From: "Tim Ellison (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6339) Sample test case showing Math differences In-Reply-To: <332426005.1252501138465.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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 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.