This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: strange behaviour with gsl_cdf_fdist_Q()
- From: Rajarshi Guha <rajarshi at presidency dot com>
- To: Martin Jansche <jansche at ling dot ohio-state dot edu>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: 03 Sep 2003 17:43:18 -0400
- Subject: Re: strange behaviour with gsl_cdf_fdist_Q()
- Organization:
- References: <Pine.SOL.4.33.0309031658480.16136-100000@julius.ling.ohio-state.edu>
- Reply-to: rajarshi at presidency dot com
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.