Re: As the Crow flies.



On 2008-10-20, spintronic <spintronic@xxxxxxxxxxx> wrote:
On Oct 20, 8:20 pm, Mark VandeWettering <wetter...@xxxxxxxxxxx> wrote:
On 2008-10-20, spintronic <spintro...@xxxxxxxxxxx> wrote:





On 20 Oct, 04:25, Mark VandeWettering <wetter...@xxxxxxxxxxx> wrote:
On 2008-10-19, spintronic <spintro...@xxxxxxxxxxx> wrote:

On 19 Oct, 23:59, spintronic <spintro...@xxxxxxxxxxx> wrote:
On 19 Oct, 22:45, r norman <r_s_norman@xxxxxxxxxxxx> wrote:

On Sun, 19 Oct 2008 14:11:30 -0700 (PDT), "Kleuskes & Moos"
Spintronic, seriously now.  

Since your starting to grow on me, here is a gift.

http://hostmyfilesfree.com/web/Prime_Predictor_Speed_5_.exe/

Little test for you.

Grab the screen, and make it smaller. (It wont take time printing)

Takes about 2 seconds to compile a *FULL* list from 1 to 1000000.

Now are you impressed?

No.  It isn't impressive at all.  It's just about what anyone who
implements a sieve in any semi-reasonable way would achieve.  It
actually seems a bit slow to me in fact.  

Bernstein's "primegen" can calculate primes up to a million in 5.6ms.
He can calculate up to 1e9 in about 3 seconds (times measured on my
laptop).

http://thedjbway.org/scientific/primegen.html

        Mark- Hide quoted text -

- Show quoted text -

You do realise it isn't a prime counting function, right?

What do you mean?  It counts primes, as well as generating them.  It does so
by sieving (at a truly impressive speed I might add), but unlike any code
we've seen from you, it actually gets the right answer.

        Mark- Hide quoted text -

- Show quoted text -


Its sole purpose is to round up to the next prime.

No. It isn't. That's one of the things that package can do (he ships
a library) but it can do all sorts of stuff. Had you built it, you'd
have seen that it includes a program (called "primes") which generates
all the primes in a given range. On my machine, it can find and print
all the primes between one and 1e9 in about 6.38 seconds.

It's a very old program.

Nine years old. Is that supposed to be damning?

I posted it mainly to responses that my pi(x) generates incorrect
answers.

It does, doesn't it?

Now you see that, that accusation is a myth.

I see nothing of the sort.

Would you like to pick a number between 1-1000?

Sure. 997. What is the purpose?

Everyone else is scared, that I may be speking the truth.

I'm only scared of the idea that I might have a job where I would be forced
to maintain code as ugly as the example you gave us.

Mark

.



Relevant Pages

  • Re: As the Crow flies.
    ... implements a sieve in any semi-reasonable way would achieve. ...  It counts primes, ... Its sole purpose is to round up to the next prime. ...
    (talk.origins)
  • Re: Pi and the distribution of prime numbers
    ... >it is claimed that pi "crops up in all sorts of unexpected places in ... In my opinion the most obvious connection between pi and the ... distribution of primes is the following: The density of squarefree ...
    (sci.math)
  • Re: greatest multiple algorithm
    ... Bernstein or Galway's quadratic form sieve rather than ... lower or smaller primes in bit sieve. ... slower with larger sieve sizes due to the large number of memory accesses. ... You can use a wheel to decrease the memory requirements. ...
    (comp.lang.asm.x86)
  • Re: greatest multiple algorithm
    ... Bernstein or Galway's quadratic form sieve rather than ... lower or smaller primes in bit sieve. ... slows down based on size memory used ... You can use a wheel to decrease the memory requirements. ...
    (comp.lang.asm.x86)
  • Re: How to write a efficient Sieve of Eratosthenes algorithm in lisp?
    ... the ultimate test is to find primes in range 999900000 - ... Also, my sieve algorithm is n log, so even if the space ... (loop for x from (start-index n) ... Real time: 0.4375 sec. ...
    (comp.lang.lisp)

Loading