Skip to content

Instantly share code, notes, and snippets.

@JudahGabriel
Last active December 24, 2015 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JudahGabriel/6794792 to your computer and use it in GitHub Desktop.
Save JudahGabriel/6794792 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char** argv)
{
static double items[1000000];
int i = 0;
for (i = 0; i < 1000000; i++)
{
double randomValue = ((double)rand() / (double)RAND_MAX);
items[i] = randomValue + i;
// Sample value: 1.462356634612
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment