#include #include #include #include "oracle.h" void oracle(double* data,long start,long n){ // I picked randomish seeds. It shouldn't matter much long seeds[] = {28470,31023,4437}; double w; int i; // Advance the seeds // Double the number of values to skip point since // each data point takes two random numbers. rand_look_ahead(start*2,seeds); // To approximate the long term behavior of a random walk, // assume that the start steps before we began // reached a distance of sqrt(start)/2 from the origin w = rand_advance(seeds); w *= sqrt(start)/2; for(i=0;i