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 1:04

someone give this man a fields medal

Name: Anonymous 2013-06-27 1:11

Slightly more efficient version:
int nonprime() {return (rand() << 1) + 2 /*thanks adam*/;}

Name: Anonymous 2013-06-27 2:58

Most optimized version: int nonprime() {return 4;}

Name: Anonymous 2013-06-27 3:10

>>1
you just infinitely reduced the search space?!?

Name: Anonymous 2013-06-27 3:12

(by 10%) ;D

Name: Anonymous 2013-06-27 3:43

>>3
but then if rand() returns 0 then the answer is prime

Name: Anonymous 2013-06-27 3:55

>>1
Congratulations for publicising, perhaps unvolontarily, the stupidity of rooting everything in infinite set theory and why a constructivist approach is needed.

Name: Anonymous 2013-06-27 4:17

>>8
Congratulations for publicising, perhaps unvolontarily, the stupidity of rooting everything in constructivism and why an infinite set theory approach is needed.

Name: Anonymous 2013-06-27 6:30

adam is a Jew name

Name: Anonymous 2013-06-27 6:44

Shalom! amirite xD

Name: Anonymous 2013-06-27 6:56

>>7
Okay, how about this: int nonprime(){int x = (rand() == 0) ? (rand() << 1) + 4 : (rand() << 1) + 2; return x;}

Name: Anonymous 2013-06-27 7:42

>>12
don't try and turn this into a troll attempt, i'm onto you

Name: Anonymous 2013-06-27 7:56

What about a fizz-buzz-hyper-sieve!?

Name: Anonymous 2013-06-27 7:57

int nonprime = 4

Name: Anonymous 2013-06-27 8:02

^^ priority queued..
and it needs fast partial re-sorting =)

Name: Anonymous 2013-06-27 8:04

>>16
I hate your posts.

Name: Anonymous 2013-06-27 8:06

>>17
I hate your lisps.

Name: Anonymous 2013-06-27 8:07

>>17
you're hired.

Name: Anonymous 2013-06-27 8:09

but do you think it might work?
maybe even better than the general prime sieve?

Name: Anonymous 2013-06-27 8:18

...you could use some type of two-step per prime thingy =) so every composite number only requires one prime factor.. and any other primes are shifted ahead to new composites on the queue

Name: Anonymous 2013-06-27 8:20

...you could use a dildo =) to dildo your anus with =)

Name: Anonymous 2013-06-27 8:29

>>22
Grinder looks lost out there!

Name: Anonymous 2013-06-27 8:36

xD
but i can see this working at least half-well =)
don't even need to restrict the primes to p^2+

Name: Anonymous 2013-06-27 8:43

is there no data structure with O(1) insert + O(1) random access ?

Name: Anonymous 2013-06-27 8:52

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

Name: Anonymous 2013-06-27 9:06

is there no nigger with 0 white wimmenz?

Name: Anonymous 2013-06-27 9:47

>>26
mfw empty set

hmm... and then for factorization.. could you use the result of a single large division (multiple and remainder) to speed it up...?

like 1,000,002 (chosen to be divisible by 3) / 1000 -> x1000 +2
then 1000 / 3 -> x333 [+1 (+2)] !?

Name: Anonymous 2013-06-27 9:51

* -> (x333 +1) * 1000 -> +1 (+2)

Name: Anonymous 2013-06-27 10:17

or even test multiple prime factors at once?!
well almost... =)

Name: Anonymous 2013-06-27 10:25

maybe the we can use the length of the dildo to find the radius of the anus...?

like 15cm / 5 = 3cm ...?
...where 5 is the maximum angle of penetration?

i think 3cm is a large anus... =)

Name: Anonymous 2013-06-27 10:30

What the fuck, Luke?

Name: Anonymous 2013-06-27 11:20

I've haxed anuses that you would think are gigantic, luke.

Name: Anonymous 2013-06-27 11:26

define "rand"

Name: Anonymous 2013-06-27 11:28

Author of Atlas Shrugged

Name: Anonymous 2013-06-27 12:12

>>35
Shalom./

Name: Anonymous 2013-06-27 12:16

>>34
Great! We needed another retard in here.

Name: Anonymous 2013-06-27 18:01

>>36
Peace, Stud./

Name: Anonymous 2013-06-27 18:48

Your exclamation marks are getting ridiculous.___

Name: Anonymous 2013-06-27 18:51

.!

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