bugGNU Scientific Library - Bugs: bug #22446, rng limit in gsl_ran_chisq()

 
 

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

bug #22446: rng limit in gsl_ran_chisq()

Submitted by:  -Deleted Account- <bjg>
Submitted on:  Fri 29 Feb 2008 10:23:01 AM UTC  
 
Category: Runtime errorSeverity: 3 - Normal
Operating System: Status: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: 1.9

Fri 29 Feb 2008 10:32:07 AM UTC, comment #1:

will be fixed in release 1.11

-Deleted Account- <bjg>
Fri 29 Feb 2008 10:23:01 AM UTC, original submission:

From: Pascal Vaudrevange <pascal.vaudrevange@case.edu>
To: -unavailable-
Subject: [Bug-gsl] Bug in gsl_ran_chisq()
Date: Wed, 27 Feb 2008 15:01:48 -0500

Hi,

when using the random number generator gsl_rng_ranmar, a call to the
distribution gsl_ran_chisq() results in an error. Using the generator
gsl_rng_default works alright.

Sample code:
--- snip ---

#include<gsl/gsl_rng.h>
#include<gsl/gsl_randist.h>

int main(int argc, char * argv[]){
gsl_rng * ran_set;
const gsl_rng_type *gsltype = gsl_rng_ranmar;
int seed=0;
double x;

gsl_rng_env_setup();
ran_set=gsl_rng_alloc(gsltype);

gsl_rng_set(ran_set, seed);
x=gsl_ran_chisq(ran_set, 13.0);
return 0;
}
--- snip ---

Output:

pascal@octonion:~/projects/random/minimal_bug > gcc minimal_bug.c -lgsl
-lgslcblas
pascal@octonion:~/projects/random/minimal_bug > ./a.out
gsl: ../gsl/gsl_rng.h:201: ERROR: invalid n, either 0 or exceeds maximum
value of generator
Default GSL error handler invoked.
Aborted (core dumped)

Thanks,

Pascal

-Deleted Account- <bjg>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 29 Feb 2008 10:32:07 AM UTCbjgStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1