Re: [gentoo-dev] Eclass for prime numbers

2006-02-12 Thread Ferris McCormick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, 12 Feb 2006, Michael Hanselmann wrote: Hello Patrick On Sun, Feb 12, 2006 at 06:42:01PM +0100, Patrick Lauer wrote: In what range do you need the random numbers? For this ebuild, lower than 1000. Um, there are 167 primes smaller that

Re: [gentoo-dev] Eclass for prime numbers

2006-02-12 Thread Michael Hanselmann
Hello On Sun, Feb 12, 2006 at 06:22:00PM +0100, Michael Hanselmann wrote: > [prime.eclass] After discussing it with Simon Stelling (blubb), I decided to put the code into the ebuild directly for now. Since this is experimental stuff, that's no problem for now. The code will be moved to an eclass

Re: [gentoo-dev] Eclass for prime numbers

2006-02-12 Thread Krzysiek Pawlik
Michael Hanselmann wrote: >> In what range do you need the random numbers? > > For this ebuild, lower than 1000. > >> And I guess a 32-bit prime is out of reach :-) > > Indeed. So maybe use a precomputed table of primes <1000 ? -- Krzysiek Pawlik key id: 0xBC51 desktop-misc, desktop-

Re: [gentoo-dev] Eclass for prime numbers

2006-02-12 Thread Mike Frysinger
On Sunday 12 February 2006 12:22, Michael Hanselmann wrote: > For an ebuild I'm working on, I need a function to test wether a number > is a prime number. For that, I wrote an Eclass you find attached to this > e-mail. Can this be commited? i cant really see how this would be useful to anything, b

Re: [gentoo-dev] Eclass for prime numbers

2006-02-12 Thread Michael Hanselmann
Hello Patrick On Sun, Feb 12, 2006 at 06:42:01PM +0100, Patrick Lauer wrote: > In what range do you need the random numbers? For this ebuild, lower than 1000. > And I guess a 32-bit prime is out of reach :-) Indeed. Greets, Michael -- Gentoo Linux developer, http://hansmi.ch/, http://forkbomb

Re: [gentoo-dev] Eclass for prime numbers

2006-02-12 Thread Patrick Lauer
On Sun, 2006-02-12 at 18:22 +0100, Michael Hanselmann wrote: > Hello > > For an ebuild I'm working on, I need a function to test wether a number > is a prime number. For that, I wrote an Eclass you find attached to this > e-mail. Can this be commited? In what range do you need the random numbers?

[gentoo-dev] Eclass for prime numbers

2006-02-12 Thread Michael Hanselmann
Hello For an ebuild I'm working on, I need a function to test wether a number is a prime number. For that, I wrote an Eclass you find attached to this e-mail. Can this be commited? Thanks, Michael -- Gentoo Linux developer, http://hansmi.ch/, http://forkbomb.ch/ We apologize for the inconvenien