Real random number generator: a basic gaussian distribution
' gauss_rand_simple() ' is a function written in language C which return a real (double) value according to a gaussian distribution, that is mean 0 and variance 1 . #include <stdlib.h> #include <time.h> //necessary for time_t variable #include <math.h> #include <stdio.h> #define NUM 100; #define NSUM 25 double gauss_rand_simple() { double x = 0; int i; for(i = 0; i < NSUM; i++) ...