Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.independent

Topic: RNGs: A Super KISS
Replies: 14   Last Post: Feb 26, 2013 10:53 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
David

Posts: 1
Registered: 11/4/09
Re: RNGs: A Super KISS
Posted: Nov 4, 2009 12:18 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On an x86-64 machine using GCC version 4.3.3 (Ubuntu 4.3.3-5ubuntu4),
both the C code and C++ code fail for me.
I get:
x=505478909.
Does x=-872412446?

Changing the unsigned long's to unsigned int's fixed the problem.
And it does matter: before the change, the generator failed a variety
of tests (really odd assortment, though: parking lot, 2dsphere,
3dsphere, squeeze, and sums).


David



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.