• propter_hog [any, any]@hexbear.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    20 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.