Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 43844 invoked from network); 14 Apr 2010 00:20:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Apr 2010 00:20:16 -0000 Received: (qmail 5746 invoked by uid 500); 14 Apr 2010 00:20:16 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 5623 invoked by uid 500); 14 Apr 2010 00:20:16 -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 5615 invoked by uid 99); 14 Apr 2010 00:20:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 00:20:16 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 00:20:14 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3E0JqsG019863 for ; Tue, 13 Apr 2010 20:19:52 -0400 (EDT) Message-ID: <27180876.83991271204392620.JavaMail.jira@thor> Date: Tue, 13 Apr 2010 20:19:52 -0400 (EDT) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Subject: [jira] Closed: (MATH-295) RandomDataImpl.nextPoisson fails for means in range 6.0 - 19.99 In-Reply-To: <1857958351.1252690857549.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/MATH-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz closed MATH-295. ---------------------------- > RandomDataImpl.nextPoisson fails for means in range 6.0 - 19.99 > --------------------------------------------------------------- > > Key: MATH-295 > URL: https://issues.apache.org/jira/browse/MATH-295 > Project: Commons Math > Issue Type: Bug > Affects Versions: 1.2, 2.0 > Environment: Java 1.6 on Mac 0S X > Reporter: Jason McFall > > RandomDataImpl.nextPoission(double mean) fails frequently (but not every time) from calls with mean >= 6.0 and < 20.0 > Below 6.0 and above 20 it seems fine, as far as I can tell by testing values at random. > When it fails, the exception is as follows - this from calling nextPoisson(6.0) > org.apache.commons.math.MathRuntimeException$4: must have n >= 0 for n!, got n = -2 > at org.apache.commons.math.MathRuntimeException.createIllegalArgumentException(MathRuntimeException.java:282) > at org.apache.commons.math.util.MathUtils.factorialLog(MathUtils.java:561) > at org.apache.commons.math.random.RandomDataImpl.nextPoisson(RandomDataImpl.java:434) > ie it's calling MathUtils.factorialLog with a negative argument. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira