Originally posted by TemplarGR
View Post
Originally posted by mlau
View Post
Anyone with an Intel CPU willing to retest changing int to int64_t?
Code:
bool IsPrime(int64_t test) { for(int64_t i= 2; i * i <= test; i++){ if(test%i==0){ return false; } } return true; } int main() { int count=0; for (int64_t i=1;i<1000*1000*10;++i) { if (IsPrime(i)) { count++; } } printf("%d\n",count); }
Leave a comment: