Created
August 3, 2012 22:42
-
-
Save nullcoding/3252280 to your computer and use it in GitHub Desktop.
GJSieve Mac Vectorless Demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mpz_t remainder, quotient, squareroot; | |
mpz_init (remainder); | |
mpz_init (quotient); | |
mpz_init (squareroot); | |
unsigned long int trial = 2; | |
mpz_sqrt(squareroot, proth); | |
[ProgressBar incrementBy:delta]; | |
for(trial=2; mpz_cmp_ui(proth,trial) > 0; trial++) | |
{ | |
mpz_fdiv_r_ui (remainder, proth, trial); | |
[ProgressBar incrementBy:delta]; | |
if (mpz_cmpabs (remainder, ZERO) == 0 && mpz_cmp_ui(squareroot,trial) > 0) | |
etc... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment