bug-gsl
[Top][All Lists]
Advanced

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

[Bug-gsl] bug in gsl_ran_binomial (GSL 1.14)


From: Sam Mason
Subject: [Bug-gsl] bug in gsl_ran_binomial (GSL 1.14)
Date: Fri, 24 Sep 2010 16:56:43 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi,

I've just started using GSL and have been suffering with my program
locking up unexpectedly.  I've just figured out that it locks up when
running:

  #include <gsl/gsl_randist.h>
  int main()
  {
    gsl_rng_env_setup();
    gsl_rng *r = gsl_rng_alloc (gsl_rng_default);
    printf ("%i\n", gsl_ran_binomial (r, 1.0, 1u<<31));
    return 0;
  }

I.e. passing 2^31 to gsl_ran_binomial causes an infinite loop.

I'm obviously in "undefined" territory here, but I'd expect to get
garbage back (as I do when I pass 2^31+1) rather than locking up.

-- 
  Sam  http://samason.me.uk/



reply via email to

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