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() - FIXED (somewhat!)


On Wed, 2003-09-03 at 17:43, Rajarshi Guha wrote:
> On Wed, 2003-09-03 at 17:02, Martin Jansche wrote:
> > On 3 Sep 2003, Rajarshi Guha wrote:
> > 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!!


Well finally I got everything working - but ina very kludgy way :(
Essentially I copied the functions:

gsl_cdf_fdist_Q
beta_inc_AXPY (from cdf/beta_inc.c)
gsl_sf_lnbeta
gsl_sf_lnbeta_e

into my own code, and renamed them. After compiling I get the proper
values within the function as well when returned from the function.

When I use these functions by calling them from the GSL library the
results are all wrong and return values differ from values computed
within the function ( at least for gsl_cdf_fdist_Q, I did'nt check the
others).

This seems very strange. Does anybody have any idea as to whats going
on?

-------------------------------------------------------------------
Rajarshi Guha <rajarshi@presidency.com> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
Regular naps prevent old age....
especially if you take them while driving


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