• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

C++ Random # Generator ~U(0,1)

Joined
2/6/09
Messages
10
Points
11
I have just come across the "Random Number Generator" section of my C++ book. It seems a bit confusing to me though...

In JAVA the random numbers were always ~U(0,1). Here, it does not appear that way. I have also read multiple times that the rand() function in C++ is not a 'good' random number generator.

I am learning C++ so I can use it while getting my MFeng at Cornell this Fall. Will using rand() be okay for all intensive purposes???
 
rand() is fine for learning. You probably want to abstract out the random number generation process so you can plug in one of the methods John mentioned or some other method altogether.
 
Back
Top