Forums > MaxMSP

Prime number generator ?

November 23, 2013 | 12:58 pm

Anyone know of a simple prime number generator for max masp on windows ? I tried tap.prime but cant find it on github or the objects database – I downloaded tap objects 4 and it doesnt find the tap.prime object -a ny others ?


November 24, 2013 | 5:41 am

The bach library ( http://www.bachproject.net ) contains a prime number generator. It is probably overkill to install the bach library if you only need that feature, but you might want to have a look anyway.

aa


November 24, 2013 | 5:41 am

The bach library ( http://www.bachproject.net ) contains a prime number generator. It is probably overkill to install the whole package if you only need that feature, but you might want to have a look anyway.

aa


November 24, 2013 | 4:41 pm

hi
I just made a prime number finder. V1 was a fail, but here is V2

it’s the yerps slow prime number finder patch.

it’s slow just because if it goes much faster it has errors in the coll where the results are kept. however v2 is a bit quicker. : P

I’d like to know how to make it go ultra fast, so fast that it makes the cpu run at 100 percent and makes the user consider water cooling. lol. like prime 95. at present it makes my CPU run at approx 1 percent (peak). So a bit disappointing in that respect; However one could actually turn the cpu fan off if there is need to find primes in stealth mode :).

Perhaps someone could give a few pointers on how to make it faster?

patch is below. >

– Pasted Max Patch, click to expand. –

November 24, 2013 | 5:06 pm

You can tell a prime number by there being only a ’1′ next to an entry in the coll. it is inefficient and slow but I believe it to be accurate.


Viewing 5 posts - 1 through 5 (of 5 total)