Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E3F21E3B2 for ; Mon, 26 Nov 2012 19:28:58 +0000 (UTC) Received: (qmail 92430 invoked by uid 500); 26 Nov 2012 19:28:58 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 92360 invoked by uid 500); 26 Nov 2012 19:28:58 -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 92351 invoked by uid 99); 26 Nov 2012 19:28:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 19:28:58 +0000 Date: Mon, 26 Nov 2012 19:28:58 +0000 (UTC) From: =?utf-8?Q?S=C3=A9bastien_Brisard_=28JIRA=29?= To: issues@commons.apache.org Message-ID: <2129057931.24111.1353958138577.JavaMail.jiratomcat@arcas> In-Reply-To: <1543210504.21693.1353886738381.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (MATH-909) FDistribution NoBracketingException in BrentSolver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-909?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D135040= 09#comment-13504009 ]=20 S=C3=A9bastien Brisard commented on MATH-909: ---------------------------------------- bq. According to the R documentation, the gamma and beta functions are C tr= anslations of the SLATEC Fortran subroutines, as you suspected. The incompl= ete gamma appears to have a different origin. According to the R documentat= ion, the pbeta function is related to the incomplete beta function of Abram= owitz and Stegun. They cite two different sources for the function dependin= g on whether it is a central or non-central pbeta. Thank you Patrick for checking the references. Didonato and Morris (1992) i= s actually the reference I used for our new implementation of {{Gamma.logGa= mma}} and {{Gamma.gamma}}, as well as {{Beta.logBeta}} (not yet committed). I'm worried about the incomplete beta function, as R uses this paper, and t= he accuracy seems to be not so good. I will look into it. =20 > FDistribution NoBracketingException in BrentSolver > -------------------------------------------------- > > Key: MATH-909 > URL: https://issues.apache.org/jira/browse/MATH-909 > Project: Commons Math > Issue Type: Bug > Affects Versions: 3.0 > Reporter: Patrick Meyer > Original Estimate: 24h > Remaining Estimate: 24h > > I get an exception when running the code below. the exception is=20 > {code} > function values at endpoints do not have different signs, endpoints: [0, = 1.002], values: [-0.025, -=E2=88=9E] > {code} > The problematic code: > {code} > double df1 =3D 10675; > double df2 =3D 501725; > FDistribution fDist =3D new FDistribution(df1, df2); > System.out.println(fDist.inverseCumulativeProbability(0.025));//NoBracket= ingException > {code} > However, R returns the value 0.9733505. The R code is: > {code} > qf(p=3D.025, df1=3D10675, df2=3D501725) > {code} > I don't know enough about the FDistribution class to know the solution to= the exception, but I thought I would report it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira