[Top][All Lists]

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

Re: [Bug-gsl] initialisation of random number generator on 64bit machine

From: Vito Trianni
Subject: Re: [Bug-gsl] initialisation of random number generator on 64bit machine
Date: Fri, 12 Sep 2008 16:52:48 +0200

Please find attached an example program that reproduces the error I was experiencing. I tested it on both 32- and 64-bit architectures, and it actually does not produce random values on the latter (see the "local" values in the last line of output: it varies across different runs on 32-bit architectures, but it does not on 64-bit ones).
Let me know if I can help more.

Attachment: bug-gsl.cpp
Description: Binary data

On Sep 5, 2008, at 6:22 PM, Brian Gough wrote:

At Wed, 03 Sep 2008 15:43:33 +0200,
Vito Trianni wrote:

I noticed the following behaviour when initialising the random number
generator on a 64bit machine. Basically, on a 64 bit machine, the
unsigned long int probably provokes an overflow in the gsl_rng_set()
function, so that the initialisation of the seed in some way fails, and I got always identical numbers despite different seeds. Here is part of
the code that made the overflow:

Thanks for your email -- could you send a complete example program
showing the seed and output values so we can reproduce the
problem. Thank you.

Brian Gough

GNU Scientific Library -

= = ========================================================================
Vito Trianni, Ph.D.                                     
via San Martino della Battaglia, 44     
00185 Roma                                                      Tel: +39 06 
44595 215
Italy                                                                   Fax: 
+39 06 44595 243
= = ========================================================================

reply via email to

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