#include "../squiggle.h" #include "../squiggle_more.h" #include #include #include #include int main() { // Replicate , and in particular the red line in page 11. // Could also be interesting to just produce and save many samples. // set randomness seed uint64_t* seed = malloc(sizeof(uint64_t)); *seed = UINT64_MAX/64; // xorshift can't start with a seed of 0 int n_samples = 100*MILLION; int p_sixteenth = 0; int p_eighth = 0; int p_quarter = 0; int p_half = 0; double sample; for(int i=0; i 0.5\n"); } } printf("p_16th: %lf; p_eighth; %lf; p_quarter: %lf; p_half: %lf", ((double)p_sixteenth)/n_samples, (double)p_eighth/n_samples, (double)p_quarter/n_samples, (double)p_half/n_samples); }