Serving the Quantitative Finance Community

 
User avatar
ebifry
Topic Author
Posts: 0
Joined: December 9th, 2001, 8:34 am

Looking for Source Code For Gaussian Normally distributed random number generator

September 25th, 2002, 10:43 am

Hi FolksWell....I have decided that Matlab is a bit slow for what I am trying todo, so I want to re-write some of my code in c or c++. All is going wellexcept I don't want to have to write a random number generator fromscratch. Can someone please point me in the direction of some sourcecode for a well tested and fast Gaussian Normally distributed randomnumber generator.CheersTony
 
User avatar
Hobbes
Posts: 0
Joined: September 24th, 2002, 4:32 pm

Looking for Source Code For Gaussian Normally distributed random number generator

September 25th, 2002, 10:57 am

I think there is some code publised in Numerical Recipies in C (and now C++). The C book is here for free http://www.library.cornell.edu/nr/nr_index.cgior you can buy one. The C++ one is only available via book shops. There is also code that you can buy online.Best, Hobbes.
 
User avatar
jamesbattle
Posts: 0
Joined: May 12th, 2002, 8:28 pm

Looking for Source Code For Gaussian Normally distributed random number generator

September 27th, 2002, 11:08 pm

From vague memory there might also be one in QuantLib, which is a freelibrary of functions for quant. work.Check at http://www.quantlib.org/From memory (I might be wrong) you can download all the source and hencepick out the chunk of code you need.**Company Disclaimer**(Please note that we have not checked any of the QuantLib either for accuracyor stability - you should certainly do this before using it in any production work)
 
User avatar
plessas
Posts: 2
Joined: March 9th, 2002, 10:23 pm

Looking for Source Code For Gaussian Normally distributed random number generator

September 27th, 2002, 11:34 pm

Jamesbattle is right. I dont know how well or fast they work but they are here!rgds,Dimitris
 
User avatar
bkloss
Posts: 0
Joined: May 22nd, 2002, 11:51 am

Looking for Source Code For Gaussian Normally distributed random number generator

October 2nd, 2002, 6:41 am

Re Numerical Recipes: The books are fine, as books, but the code is atrocious. Oh, and read the license agreement to the code - it's incredibly restrictive.My advice would be to pull one off the web, or write your own after reading NR.