LISP for Recursive Math Problems: Choosing Between Common Lisp and Scheme

  • Thread starter Thread starter qntty
  • Start date Start date
AI Thread Summary
For solving tedious, recursive math problems, Scheme is recommended over Common Lisp and Python due to its inherent support for tail-call optimization, which prevents stack overflow during recursion. While Python is a popular language, it does not optimize tail-call recursion, leading to potential issues with deep recursive calls. Scheme's design aligns well with functional programming techniques, making it a suitable choice for the task at hand.
qntty
Messages
289
Reaction score
4
I need a programming language primarily to solve tedious, recursive math problems. I've heard that lisp is good for this but don't know whether to go with common lisp or scheme. If there are any other languages that you think will do this better I'd like to hear of those too (I'd prefer not to use a CAS language like maple or mathematica).
 
Technology news on Phys.org


Python.
 


If I am not mistaken, Python does not optimize away tail-call recursion - it will simply put every instance of the function on the stack, eventually leading to an overflow. Scheme does this by design. Scheme and Lisp are much more natural for functional programming techniques than Python.

I suggest Scheme.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top