The old version decomposed "100" into "[0, 0, 10]" in base 10. Also, it never really threw an exception if the number was too large to write with the given number of digits, it just produced one giant digit to compensate.
The new version does the more usual computation of computing the digits from least significant to most significant.
To be honest, I’m just crossing my fingers that the code works now. Also, it doesn’t depend on anything and the code itself is unlikely to change in the future :)
The old version decomposed "100" into "[0, 0, 10]" in base 10. Also, it never really threw an exception if the number was too large to write with the given number of digits, it just produced one giant digit to compensate.
The new version does the more usual computation of computing the digits from least significant to most significant.