Thread: Fast normal random number generator

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    6

    Fast normal random number generator

    I'm looking for a really fast gaussian random number generator for c/c++. The faster the better because I have a lot of them I need to generate for a monte carlo operation. Do you guys have any suggestions?

    Thanks!

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    See if these are fast enough for you. You can replace the random number generator with something faster than rand, but generally, the the faster the generator, the lower the quality.
    My best code is written with the delete key.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. adding a number to a number
    By bigmac(rexdale) in forum C Programming
    Replies: 11
    Last Post: 10-24-2007, 12:56 PM
  2. C++ program random number generator need help
    By catdieselpow in forum C++ Programming
    Replies: 15
    Last Post: 10-07-2007, 04:53 PM
  3. Random Number Generator?
    By DZeek in forum C++ Programming
    Replies: 21
    Last Post: 03-13-2005, 02:11 PM
  4. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  5. Replies: 2
    Last Post: 01-04-2004, 05:52 PM