bugGNU Scientific Library - Bugs: bug #36366, multifit_linear example uses old...


You are not allowed to post comments on this tracker with your current authentication level.

bug #36366: multifit_linear example uses old default random number generator

Submitted by:  Rhys Ulerich <rhysu>
Submitted on:  Wed 02 May 2012 01:32:50 AM UTC  
Category:  Documentation Severity:  2 - Minor
Operating System:  Status:  Fixed
Assigned to:  Rhys Ulerich <rhysu> Open/Closed:  Closed

Mon 10 Jun 2013 09:13:46 PM UTC, comment #1:

documented fit example with GSL_RNG_TYPE=mt19937_1999

Patrick Alken <psa>
Project Administrator
Wed 02 May 2012 01:32:50 AM UTC, original submission:

From Jim Heasley
To: -email is unavailable-

Below is an email exchange I had with Rhys Ulerich regarding my inability to reproduce the
test case for the gsl_multiinear_wfit module. Rhys concluded thhat the problem was due to the
use of a different random number generator. As noted at the end of his email he suggested that I
ask that the example be documented as having used GSL_RNG_TYPE=mt19937_1999 or that a
new test be published for the new default generator.

Thank you.

Jim Heasley

-------- Original Message --------
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


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
FWIW, I can reproduce the 'demo' program output shown earlier in that

I think there has been a change to the default gsl_rng_env_setup
since when that example was written? Going through rng/ChangeLog I

Thu Jul 9 13:56:20 1998 Brian Gough<bjg@vvv.lanl.gov>

* default.c (gsl_rng_env_setup): made gsl_rng_mt19937 the default

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

Rhys Ulerich <rhysu>
Project AdministratorIn charge of this item.


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psa (Posted a comment)
  • -email is unavailable- added by rhysu (Submitted the item)
  • -email is unavailable- added by rhysu



    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-10 psa StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2012-05-02 rhysu Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3