This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strange behaviour with gsl_cdf_fdist_Q()


On Wed, 2003-09-03 at 17:02, Martin Jansche wrote:
> On 3 Sep 2003, Rajarshi Guha wrote:
> 
> > I took the code from fdist.c and beta_inc.c and basically renamed the
> > functions and compiled the code directly into my binary. Now running my
> > program gives different values of P inside the function and absurd
> > values of the return value after it has returned from the function!
> 
> The first thing to check is whether you're using the correct
> prototypes for all your functions.  Putting all the necessary
> functions in one file is a good idea, and you might now want to also
> explicitly declare all prototypes at the beginning of your file.  If
> you're using GCC to compile, turning on "-Wstrict-prototypes
> -Wmissing-prototypes -Wmissing-declarations" is a good idea as well.

Thanks! That improved matters. Now the value calculated in the function
and returned from the function match.

However, the value calculated is wrong! Or at least different from what
I get when using the routine from the GSL library. Furthermore, using
the routine in the GSL library results in the returned value and
calculated value (within the gsl_cdf_fdist_q() function) being
different.

I looked at the decleartations in gsl_cdf.h and everyhting seems to be
OK. I'm really stumped!!

-------------------------------------------------------------------
Rajarshi Guha <rajarshi@presidency.com> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
If you believe in telekinesis, raise my hand.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]