bug-gsl
[Top][All Lists]
Advanced

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

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


From: Sam Mason
Subject: Re: [Bug-gsl] bug in gsl_ran_binomial (GSL 1.14)
Date: Mon, 27 Sep 2010 11:49:36 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Sun, Sep 26, 2010 at 05:39:41PM +0100, Brian Gough wrote:
> Thanks for the bug report, I agree that should be handled better.

Just been having a play and it looks as though it's because gsl_pow_int
assumes that "-n" will remove the sign when n < 0.  This appears not to
be the case for n = 1<<31, where -n is the identity function.

I've changed the function to store the result in an unsigned variable
and the function terminates now.

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

Attachment: gsl-1.14-gsl_pow_int-overflow.patch
Description: Text Data


reply via email to

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