Im using the Monte Carlo method to get an estimate of Pi.
I generate numbers between 0.0 and 1.0, using the following function (similar to the one in the FAQ)
The estimation of pi depends on the quality of the random number generator, I was wondering if there is any way to make my function generate 'better' random numbers?
double generate_rand(double min, double max)
static int Init = 0;
if (Init == 0)
Init = 1;
rc = (rand() / (RAND_MAX + 1.0) * (max - min) + min);