You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The efficiency of this method is pretty abysmal for base-10. It can be improved somewhat by finding the largest power of 10 that will fit in uintmax_t ( $n = floor(log_{10}(uintmax)$ ) and serialising it to base $10^n$ instead.
We just need to take care to pad intermediate digits with the full number of leading zeroes, and not pad the leading digit at all.
This technique can also be used for other bases, although we might find that using bit-shifting approaches for those that are binary powers is good enough.
The text was updated successfully, but these errors were encountered:
The efficiency of this method is pretty abysmal for base-10. It can be improved somewhat by finding the largest power of 10 that will fit in$n = floor(log_{10}(uintmax)$ ) and serialising it to base $10^n$ instead.
uintmax_t
(We just need to take care to pad intermediate digits with the full number of leading zeroes, and not pad the leading digit at all.
This technique can also be used for other bases, although we might find that using bit-shifting approaches for those that are binary powers is good enough.
The text was updated successfully, but these errors were encountered: