• propter_hog [any, any]
    ·
    edit-2
    2 days ago

    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.