|
Boost : |
Subject: [boost] Random numbers question
From: Anant Rao (arao_at_[hidden])
Date: 2009-07-24 18:47:31
Hi,
I'm using Mersenne Twister algo to generate random numbers on Windows and Linux using the same code. Boost ver 1.39.
Here's the simple code I have:
boost::mt19937 rng(43);
boost::uniform_01<boost::mt19937> zeroone(rng);
float randomNumber = zeroone();
If I run it multiple times, I get the same result on the same OS, as expected. However, the random numebrs are different between Windows and Linux.
Is this the expected behavior? Is there anything I can do to get the same random numbers on Windowd and Linux?
Thanks a lot,
Anant
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk