Skip to content

Instantly share code, notes, and snippets.

@nullcoding
Created August 3, 2012 22:38
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 nullcoding/3252245 to your computer and use it in GitHub Desktop.
Save nullcoding/3252245 to your computer and use it in GitHub Desktop.
GJSieve Vector Demo
std::vector<unsigned long int> ta(99999);
for (u=0; u<99999; u++, dos++) //we start at two because 1 is obviously always a factor
{
ta[u] = dos;
}
for (u=0; u<99999; u++)
{
trial = ta[u]; // see, no confusion now
mpz_fdiv_r_ui (remainder, proth, trial);
etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment