I am trying to expand upon hobnobs bignum datum but I can not figure out how to solve for nth roots.
I cam across this algorithm:
It seems to be the best way to find the nth root of a number that is stored as a string. However, I can't figure out how to get a generic version of this algorithm working. I can kind of get it working for square root and cube root but not for any nth root. Does anyone have an implementation of this algorithm for BYOND or perhaps a pseudo code example or any other method for solving the nth root of a number stored as a text string of arbitrary length?
Here are a couple other example of the algorithm as used to solve square roots and cube roots.
Apr 20 2011, 1:18 pm