Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 2402 invoked from network); 18 Mar 2010 21:08:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Mar 2010 21:08:51 -0000 Received: (qmail 11404 invoked by uid 500); 18 Mar 2010 21:08:50 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 11340 invoked by uid 500); 18 Mar 2010 21:08:50 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 11329 invoked by uid 99); 18 Mar 2010 21:08:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Mar 2010 21:08:50 +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; Thu, 18 Mar 2010 21:08:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 46B9A234C48D for ; Thu, 18 Mar 2010 21:08:27 +0000 (UTC) Message-ID: <1515201701.351381268946507288.JavaMail.jira@brutus.apache.org> Date: Thu, 18 Mar 2010 21:08:27 +0000 (UTC) From: "Michael Sammeth (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (MATH-354) compiler dependency in RandomDataImpl.getPoisson(double mean) 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 compiler dependency in RandomDataImpl.getPoisson(double mean) ------------------------------------------------------------- Key: MATH-354 URL: https://issues.apache.org/jira/browse/MATH-354 Project: Commons Math Issue Type: Bug Affects Versions: 2.0 Environment: jre1.5/jre1.6 Reporter: Michael Sammeth Hi, in RandomDataImpl.getPoisson(double mean) I got the following problem in the case mean>= 6.0: in the branch if (u <= c1): if (x < -mu) w = Double.POSITIVE_INFINITY; implicits that (int) (mu+ x) < 0 I found that for some compiler/run-time environments the subsequent update of the "accept" value then fails, as by the right hand side of the comparison leads to an Exception in MathUtils.factorialLog((int) (mu + x)). Some compiler/jre combinations, however, skip evaluating the right side as by isInfinity(w). To ensure stability, I currently worked around by an explicit if(Double.isInfinity(w)) branch, however, I would like to ask whether there is a more elegant way to ensure general functionality of that method. Thank you, micha. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.