this post was submitted on 30 Nov 2024
10 points (100.0% liked)
Programming
241 readers
10 users here now
Welcome to the Lemmygrad programming community! This is a space where programmers of all levels can discuss programming, ask for help with problems, and share their personal programming projects with others.
Rules
- Respect all users, regardless of their level of knowledge in programming. We're here to learn and help each other improve.
- Keep posts relevant to programming and related topics.
- Respect people's personal preferences. If you disagree with someone's choice of programming language, method of formatting code, or anything else, don't attack the poster. Genuine criticism is fine, but personal attacks are not.
- In order to promote breaks from typing, all code snippets must be photos of code written on paper.
Just kidding :), please use proper markdown code blocks.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yes, if you use
gmp.h
, you can do it. Lisp does it out of the box. The problem isn't tail recursion (although that's a great way of saving memory), it's that the size of an integer in a normal language is 64 bits at the maximum. If you have a library such as GMP to coerce that into an array underneath, then it can be done.