-  [WT]  [PS]  [Home] [Manage]

Prime test Anonymous 22/02/17(Thu)19:25 No. 18131 Board: /sci/ [Reply]
18131

File 164512235712.jpg - (3.32KB , 119x122 , download.jpg )

Today one of my recurring dream characters named Jennifer Zemblini gave me a prime number test that correctly validated the first few hundred prime numbers in under 3 seconds using C# code I wrote to validate her primality test!

I wanted to share the primality test with you all now.

It uses only simple division, addition and subtraction. And three variables called n, A and B.

n is defined as the number being tested for primeness. A0 is n-2 and B0 is 2.

Then apply this procedure: Divide A by B, if it is not a clean division, meaning there is a remainder, add one to B and subtract one from A, and repeat this step until B approaches one-half of n.

If A can never divide evenly into B then n is prime.

For example with n=9, which is not prime: A = 9-2. B =2. 7/2 is not even. 6/3 does evenly divide with result 2. And 3 is a factor of 9 also.

But for a prime like 13: 11/2... 10/3... 9/4... 8/5... 7/6... None of these divide cleanly with no remainder, therefore 13 is prime.
Message too long. Click here to view the full text.


4 posts and 1 image omitted. Click Reply to view.
>>
Anonymous 22/02/21(Mon)05:33 No. 18143

>>18142
>quotient is still zero when dividend = n, thus n % m == (n + m * k) % m for any integer k.
This is an error. I meant to say that the remainder is still zero.


>>
Anonymous 22/06/19(Sun)13:11 No. 18281

I want to clarify that you don't need to sweap across the entire half of the number. If there are no such A and B before B is greater than sqrt(n). There won't be any at all.
And what you did is just a fancy way to do Euclid primality test by checking the first sqrt(n) numbers if any divide n. Since you are checking if B divides A which is none but n-B
Since for all B, B divides itself
So B divides the sum of n-B and B = n
So you're back with the normal primality test, maybe even worse cause you are wasting time computing n-B.
Your Jennifer is retarded.


>>
Anonymous 23/07/26(Wed)00:04 No. 18683

Your primality test is 100% right and there is no exception to it. The only problem is that it's not only inefficient (it has an asymptotic complexity of O(n)) but it is basically testing the divisibility of n by any number in the range (2,n/2).




I installed government surveillance in my own house Edgar Anon Poe 25/12/20(Sat)20:02 No. 7682 Board: /grim/ [Reply]
7682

File 176625737417.jpg - (573.94KB , 1890x1890 , 20251219_231102.jpg )

I swear to God this is not another conspiracy thread.As the title says.. Now I have coppers banging on my door... Is it too late or do they already know everything?


6 posts and 3 images omitted. Click Reply to view.
>>
Edgar Anon Poe 25/12/22(Mon)00:25 No. 7692
7692

File 176635954555.jpg - (568.40KB , 1890x1890 , 20251222_011605.jpg )


>>
Edgar Anon Poe 25/12/22(Mon)00:25 No. 7693
7693

File 176635955547.jpg - (543.55KB , 1890x1890 , 20251222_011557.jpg )


>>
Edgar Anon Poe 25/12/22(Mon)00:26 No. 7694
7694

File 176635956734.jpg - (497.12KB , 1890x1890 , 20251222_011538.jpg )




Cryomancer ## Admin ## 09/07/11(Sat)10:30 No. 297 Board: /unf/ [Reply] [First 100 posts] [Last 50 posts]
297

File 124730100539.jpg - (136.79KB , 1600x1064 , 4933d2c0.jpg )


122 posts and 110 images omitted. Click Reply to view.
>>
Anonymous 12/05/19(Sat)07:30 No. 20342



>>
Anonymous 18/02/12(Mon)18:13 No. 25035
25035

File 15184555925.jpg - (267.81KB , 1000x750 , 134_1000.jpg )

Save this thread


>>
Anonymous 18/06/27(Wed)21:25 No. 25061

>>25035
exactly what chinese girls begs every single minute for, superiority. We should help them.




Anonymous 25/04/07(Mon)16:35 No. 89465 Board: /gif/ [Reply]
89465

File 174403653382.gif - (2.92MB , 600x337 , 1384075357_248672660.gif )


3 posts and 3 images omitted. Click Reply to view.
>>
Anonymous 25/04/16(Wed)13:59 No. 89485
89485

File 174480479084.gif - (0.97MB , 500x269 , 91482f85486d49388e358f5d6e834629.gif )


>>
Anonymous 25/05/08(Thu)13:58 No. 89575
89575

File 174670548799.gif - (1.92MB , 500x300 , tumblr_mio2bxaus51rrimkpo1_400.gif )


>>
Anonymous 25/05/08(Thu)16:27 No. 89585
89585

File 174671443531.gif - (967.05KB , 400x300 , 4039640_d6416c0fa4b2fa9b2201e05f2159b935_800.gif )




Anonymous 25/10/06(Mon)17:20 No. 25947 Board: /unf/ [Reply]
25947

File 175976400368.jpg - (71.83KB , 500x730 , 928727.jpg )




Anonymous 13/05/20(Mon)22:46 No. 41366 Board: /d/ [Reply] [Last 50 posts]
41366

File 136908277465.png - (355.90KB , 766x562 , 1353736703643.png )

Traps, adult traps. No shotas.


62 posts and 183 images omitted. Click Reply to view.
>>
Anonymous 21/09/18(Sat)22:27 No. 46519
46519

File 163199682621.jpg - (261.40KB , 1280x1625 , 87.jpg )


>>
Anonymous 21/10/02(Sat)16:17 No. 46522
46522

File 163318425353.jpg - (29.49KB , 563x630 , Hentai_AstolfoCahins.jpg )


>>
PornInvolvingDrugs 21/10/20(Wed)11:11 No. 46523

Adult traps? Lame. Only shota traps are hot.




Wow Anon Kalashnikov 16/10/08(Sat)04:23 No. 15339 Board: /w/ [Reply]
15339

File 147589343411.jpg - (7.76KB , 179x282 , harle.jpg )

In the Philippines, there is a young Filipino who leads one of the most powerful ngos in the world, with millions of members, and have ties with leftists, socialists, muslims, and catholics, politicians and military personnel. Aside from the fact that two Filipinos students have created the Iloveyouvirus, this ngo and its leader have created some of the most powerful ciphers in the world: many of which were mentally calculated and which processes cannot be recorded even by the most advanced drones and surveillance systems in the world. This young leader has also undermined the doctrine of MAD (Mutually Assured Destruction), and has pointed out, not only that the United States and its allies would be outnumbered by its enemies, but Russian and Chinese EMP weapons technology have also surpassed that of the US. The young Filipino has repeated warned his fellows of the potency of Russian jamming technology, such that NATO would look like a mere insect. Furthermore, not only has the US has been plunged in a debt of over 19 trillion dollars, but its politicians also worry that its nuclear deterrent is behind that of its enemies.
There is no valid reason for the US allies to continue in their dependence and “trust” in the United States. Remember the Turkey Coup Plot and the Brexit results. The NGOs can unite even against the most powerful nations in the world. There is no reason to believe in American propaganda. The Arabs reportedly own over 14 trillion dollars worth of assets, and it would be easy for them to unite with pro-Muslim and pro-socialist NGOs…even to declare war against a superpower, if necessary. The young Filipino has estimated, that a budget of 5 trillion dollars would be enough to create a military power, more than two times as potent as that of the United States.




Zed 17/08/09(Wed)02:39 No. 12136 Board: /pco/ [Reply] [First 100 posts] [Last 50 posts]
12136

File 150223916384.jpg - (263.62KB , 1312x1700 , 0.jpg )

Star VS the forces of sexual tension.


231 posts and 181 images omitted. Click Reply to view.
>>
Zed 20/12/05(Sat)17:33 No. 15219

>>15198
Fair.


>>
Anonymous 24/05/15(Wed)07:50 No. 17236

do we have a thread for area's other arts?
8muses deactivated their forums


>>
Anonymous 25/09/12(Fri)04:10 No. 18442

Bump for prosterity




Anonymous 25/11/29(Sat)14:36 No. 840940 Board: /b/ [Reply]
840940

File 176442341553.png - (896.55KB , 614x373 , vauva_itku_tunteisiin.png )

What should I do I humiliated myself by crying and crying endlessly to a troll that win the debate and now I am butthurt and created two threads about how butthurt I am.




Plato's Democracy to Tyranny Anonymous 18/04/19(Thu)19:20 No. 13503 Board: /phi/ [Reply]
13503

File 152415843966.jpg - (273.31KB , 1258x1600 , plato.jpg )

In the United States and other western democracies (see it's in the phrase). We are currently in a degenerate cosmopolitan democracy that values wealth, possessions, and sex over virtue and intellectual pursuits. From here individuals are atomized. They begin to hate their situation and they demand the rule of a tyrant. This explains the phenomena of Trump, the support for Bernie Sanders, and even some of the youths support for Jeremy Corbyn in the UK.

As an American, I was surprised by the vociferous response of virtually any progressive millennial to brexit. I couldn't understand why they cared. Until it dawned on me, we have become so cosmopolitan that people want an all powerful supranational entity to rule over their quasi-bohemian lifestyle.


16 posts and 1 image omitted. Click Reply to view.
>>
Anonymous 24/06/30(Sun)10:32 No. 15515

>>14307
This is also the same problem with the current idea of maturation.

Ancient society used to have children participate in industrial and political.affairs.
Most people nowadays lack the basic skills for propr adulthood.
They cannot cook, clean, fix machinery, etc.
But they feel entitled to have a spouse and suburban minimansion just because theyre "old enough".

People nowadays whine about being single amd lonely yet theyre still screwing around with booze amd drugs or binge watching TV and focusing on "get rich quick schemes".
They want to have a perfect marriage despite having a high body count, dietary-induced disorders, anxiety, paraphilia, overweightness,


>>
Anonymous 24/09/01(Sun)00:01 No. 15616

my political opinions are simple:

- we should get rid of representitive democracy, elected leadership has got all the problems that arose under monarchy, but worse because the people are less willing to rise up against the system.
- i propose one of the three; either we go back to having absolute supreme leaders such as a monarchy or dictatorship, or we install a true (direct) democracy where legislative policy is made by a direct vote of the people, or we go full lolbert and establish some barebones set of minarchist laws that are necessary to keep a society stable, and count on covenant communities and natural consequnces to shape the laws of every region beyond the basic laws of ownership regard oneself and ones property (dont kill, dont steal, etc. - plus we can play the fun game of deciding who gets coverage under the laws of the nap), minimal law like those offered up under the principle of nonaggression are also good for eugenics as the dumbasses and asshats are permitted to cull themselves by way of their own inferiority.

- in any event, political change can only come through a circumvention of the system, and that means violent revolution. the goal of a good activist group should be the deatruction or nationalization of their country's (((central banking))) and (((revenue collection)).


>>
Anonymous 24/12/30(Mon)07:12 No. 15853

>>14265
Everyone whines about loss of virtue. The problem is virtue is often romanticised as pretentious scholasticism





Delete post []
Password