|
From: | Daniel Falster |
Subject: | Re: [Bug-gsl] Error in gsl_cdf_fdist_Pinv |
Date: | Mon, 13 Nov 2006 07:47:20 +1100 |
User-agent: | Thunderbird 1.5.0.7 (Windows/20060909) |
Hi Brian,Sorry, below find example program and output from my windows XP. I am using ver1.8 (30 Mar 06) downloaded from sourceforge.net. Thanks, Daniel
PROGRAM #include <gsl/gsl_randist.h> #include <gsl/gsl_cdf.h> #include <iostream> using namespace std; int main(void) { for(int df =1; df<350; df+=10) cout<<df<<"\t"<<gsl_cdf_fdist_Pinv(0.95,1,df)<<endl; system("pause"); return 0; } OUTPUT: Microsoft Windows XP [Version 5.1.2600] F:\_resources\C>Project1 1 161.448 11 4.84434 21 4.32479 31 4.15962 41 4.07855 51 4.03039 61 3.99849 71 3.97581 81 3.95885 91 3.94569 101 3.93519 111 3.92661 121 3.91946 131 3.91343 141 3.90826 151 3.90378 161 3.89987 171 3.89642 181 3.89335 191 3.89061 201 3.88814 211 3.88591 221 3.88388 231 3.88203 241 3.88033 251 3.87877 261 -1.#IND 271 -1.#IND 281 -1.#IND 291 -1.#IND 301 -1.#IND 311 -1.#IND 321 -1.#IND 331 -1.#IND 341 -1.#IND Press any key to continue . . . Brian Gough wrote:
At Fri, 10 Nov 2006 12:08:31 +1100, Daniel Falster wrote:The function double gsl_cdf_fdist_Pinv (double P, double nu1, double nu2) is in GSL ver1.8 but hasn't been included in earlier versions. It returns the inverse of the cumulative distribution function for the F-distribution. The arguments nu1 and nu2 are the degrees of freedom (1,..., Inf). When nu1 =1, and nu2 greater than ~ 250 the functions fails. I have verified this for both windows and unix versions.For example, for (int y = 1; y<500; y+=20)cout<<y<<" \t"<<gsl_cdf_fdist_Pinv(0.95,1.0,y)<<endl; fails for y > 240 on windows XP.Hello, Thanks for your email. Could you send the whole example program (with #include's etc) and its complete output showing how it fails, so I can reproduce the problem correctly.
-- ********************************** Daniel Falster Biological Sciences Macquarie University, Australia Work: address@hidden Home: address@hidden http://daniel.falster.no/ **********************************
[Prev in Thread] | Current Thread | [Next in Thread] |