Search found 1 match

by Jewel
Sun Nov 17, 2002 9:57 am
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 33510

Method for generating prime faster

#include<stdlib.h> #include<malloc.h> #define isprime(f,x) (*(f+(x)/16)&(1<<(((x)%16L)/2))) #define setprime(f,x) *(f+(x)/16)|=1<<(((x)%16L)/2) void main() { unsigned char *field=NULL,*zzz; unsigned long teste=1,max,mom,count,alloc; max=20010000L; while(field==NULL) zzz=field=(unsigned char*) malloc...

Go to advanced search