Re: Stack overflow in relatively simple programs




robinganemccalla@xxxxxxxxx wrote:
Neither of these functions gets past primes in the 6000s... Am I
missing out on something tremendously inefficient in my code or is
their some problem with LISP? Any help would be greatly appreciated, I
don't want answers to the problem I just want to know why my answers
aren't working.

I believe this is more a problem with your algorithms and not Lisp. I
suggest looking into non-recursive methods for calculating primes.
Check out the Sieve of Eratosthenes algorithm.

http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes

Hope this helps,

AnthonyF

.



Relevant Pages

  • Re: Is Lisp more than another language?
    ... > It seems that even Peter Seibel's very interesting book is missing such ... The kind of thing that were you working next to a Lisp Guru, ... I'm sure for many features, Allegro, LW and MCL overlap, but for new people ... they're missing, or write some feature off as less important than it sounds. ...
    (comp.lang.lisp)
  • Re: Help with floating point non-reversibility
    ... numeric type is double floats. ... I was just playing with it in Lisp ... Uh, reciprocal, unleses I'm missing something, is 1/p not 1 - p. ... people could see the basic problem I face. ...
    (comp.programming)
  • Debugging Lisp code (stupid newbie question)
    ... followed by a lengthy absence. ... I seem to be missing the ... Common Lisp", I haven't been able to find any way to set a breakpoint, ... Please forgive me if this is a FAQ. ...
    (comp.lang.lisp)
  • Re: CLOS and databases
    ... Pete Kirkham wrote: ... > have to use an editor for lisp too, so the difference today is do I ... Are quite sure you're not missing anything here? ...
    (comp.lang.lisp)
  • Re: What to do with (time (length L)) proportional to (length L)
    ... > provided by other languages that is missing from Lisp? ... Queues and binary trees spring to mind. ...
    (comp.lang.lisp)