Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Fast Composite Number Generator

Name: Anonymous 2013-06-27 0:53

Finally, I have found a solution that generates non-primes that can easily be understood by the layman.
int nonprime() {return (rand() + 2) * 5;}

Interestingly enough this also can be used to find prime numbers, as no number returned by this function is an element of the set of primes, greatly reducing the search space.

Name: Anonymous 2013-06-27 8:52

>>25
Is there no data structure with 0 insert + 0 random access?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List