Thread: Is there any function better than rand()

  1. #16
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by SlyMaelstrom
    Not to be the one to toot another member's horn, but this is a good read:

    http://eternallyconfuzzled.com/articles/rand.html

    and here is their rand library:

    http://eternallyconfuzzled.com/libs/jsw_rand.html
    This is offtopic, but I always wondered how people end up reviving topics 6 months old? I mean its not like its on page 1/2..
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  2. #17
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    That's a good question, I hadn't even noticed. It was at the top of the forum with a new post when I posted. How it got there, I don't know. My guess is someone made a post then deleted it. If that's not the case then for some more strange reason it just simply went to the top of the forum with the new posts. Perhaps a side effect of a server reset or something.
    Sent from my iPadŽ

  3. #18
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    This is offtopic, but I always wondered how people end up reviving topics 6 months old?
    I hate that. SlyMaelstrom-- for not checking the date.

  4. #19
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Hey come on, cut me some slack here. It was at the top of my list and it was probably at the top of yours as well. So what's the difference if I posted in it or not? It was already bumped to the top by the forum.
    Sent from my iPadŽ

  5. #20
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    And what's the big deal anways? It's no longer about helping the OP but it usually becomes a discussion for the other memebers. Sly you reminded me about those links, nice read =)

    I wonder how long Prelude's rand period is. It's based on something with 2^19937-1 so it must be pretty good...

  6. #21
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    This is pretty comical. I admit, I didn't notice the original thread date. And apparently Salem didn't notice either.

  7. #22
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    I confess I didnt know it either. Must be the randomness....

    I wonder how long Prelude's rand period is. It's based on something with 2^19937-1 so it must be pretty good...
    She's implementing Mersenne Twister, so the period is indeed 2^19937-1
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. doubt in c parser coding
    By akshara.sinha in forum C Programming
    Replies: 4
    Last Post: 12-23-2007, 01:49 PM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  5. Replies: 5
    Last Post: 02-08-2003, 07:42 PM