bigint: itoa support for arbitrary precision if is_power_of_two(radix)

This commit is contained in:
Jeroen van Rijn
2021-08-11 20:59:50 +02:00
parent e600e5947b
commit 5af85aed3d
4 changed files with 82 additions and 16 deletions
+1
View File
@@ -111,6 +111,7 @@ _DIGIT_TYPE_BITS :: 8 * size_of(DIGIT);
_WORD_TYPE_BITS :: 8 * size_of(_WORD);
_DIGIT_BITS :: _DIGIT_TYPE_BITS - 4;
_WORD_BITS :: 2 * _DIGIT_BITS;
_MASK :: (DIGIT(1) << DIGIT(_DIGIT_BITS)) - DIGIT(1);
_DIGIT_MAX :: _MASK;