amd64 hosts: detect SSSE3 (not SSE3) capabilities on the host. As-yet unused. n...
[valgrind.git] / auxprogs / primes.c
blobbf2fb82d9b1497bbf53cc7f88c7de5d086f2512c
2 #include <stdio.h>
3 #include <math.h>
5 int isprime ( int n )
7 int m;
8 int sqrt_n = sqrt(n);
9 for (m = 2; m <= sqrt_n+1; m++) // +1 in case of obscure rounding error
10 if ((n % m) == 0) return 0;
11 return 1;
14 int main ( int argc, char** argv )
16 int i;
17 for (i = 79000; i < 81000; i++)
18 if (isprime(i)) { printf ( "%d ", i ); fflush(stdout); }
19 return 0;