[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Bug about gsl_ran_foo?
From: |
Yu Liu |
Subject: |
[Bug-gsl] Bug about gsl_ran_foo? |
Date: |
Tue, 13 Apr 2004 11:39:27 -0700 |
Version of GSL: gsl 1.4
Hardware: P4 2.4G, 128M Memory
OS: Mandrake 10.0 (community)
compiler: gcc version 3.3.2
command:
> gcc -lgsl -lgslcblas -lm
Description: If gsl/gsl_randist.h is not included, there are no warning or
errors
in compilation while gsl_ran_foo fails to return a random
number.
/* Sample program*/
#include <gsl/gsl_math.h>
#include <gsl/gsl_rng.h>
/*gsl_randist.h should be included here*/
#include <stdio.h>
#include <math.h>
int main(){
int i;
const gsl_rng_type *T;
gsl_rng *r;
gsl_rng_env_setup();
T=gsl_rng_default;
r=gsl_rng_alloc(T);
for(i=0;i<10;i++) printf("%f\n",gsl_ran_binomial(r,0.2,10));
exit(0);
}
- [Bug-gsl] Bug about gsl_ran_foo?,
Yu Liu <=