I am not so sure, because bc internally calculates in decimal
(at least the GNU version does),
so you'd have to convert the very long base 222 number to
base 10, and the result back, which could take much time.
Of course, there are other bignum libraries apart from bc,
but all of those I know calculates in a fixed base, which
is either a power of 2, or a power of 10.
It's unlikely that you'll find a pre-written bignum
library that uses base 222.
(However, you could still learn much from their code.)
| [reply] |