bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] Bug(?) in reproducing gsl_multilinear_wfit test case


From: Rhys Ulerich
Subject: Re: [Bug-gsl] Bug(?) in reproducing gsl_multilinear_wfit test case
Date: Thu, 26 Apr 2012 09:12:24 -0500

Hi Jim,

> I have been unable to get the sample code that executes the
> routine gsl_multilinear_wfit.c (which I literally cut and
> pasted from the on-line HTML documentation) to give an answer
> that is the same or even close to what is given in the
> documentation.
>
> ....
>
> My compiled  code gives the result
>
>        # best fit: Y = 1.18246 + 0.184573 X + 1.3031 X^2

I also see the result you describe when copy'n'pasting from
http://www.gnu.org/software/gsl/manual/html_node/Fitting-Examples.html.
FWIW, I can reproduce the 'demo' program output shown earlier in that
section.

I think there has been a change to the default gsl_rng_env_setup
(http://www.gnu.org/software/gsl/manual/html_node/Random-number-environment-variables.html)
since when that example was written?  Going through rng/ChangeLog I
noticed

Thu Jul  9 13:56:20 1998  Brian Gough  <address@hidden>
        
        * default.c (gsl_rng_env_setup): made gsl_rng_mt19937 the default
        generator

but it looks like the fitting example in question was generated in
2001 (http://bzr.savannah.gnu.org/lh/gsl/trunk/revision/2797).

A quick sweep through the available random number generators (try
setting an incorrect GSL_RNG_TYPE value before running ./generate to
get a list) shows that the example in the documentation was produced
using the 'mt19937_1999' generator and not the current default.

Try running 'GSL_RNG_TYPE=mt19937_1999 ./generate | ./fit 19' to see
if it reproduces what the manual documents.  It did for me.

If it does, please file a bug on savannah asking that either the
example be documented with this GSL_RNG_TYPE=mt19937_1999 detail or
the results be updated for the new default generator.

- Rhys



reply via email to

[Prev in Thread] Current Thread [Next in Thread]