How do you generate a random double uniformly distributed between 0 and 1 from C++?
Of course I can think of some answers, but I\'d like to know what the standard pr
If speed is your primary concern, then I'd simply go with
double r = (double)rand() / (double)RAND_MAX;