bigint: Added some more helpers.

This commit is contained in:
Jeroen van Rijn
2021-08-11 20:59:50 +02:00
parent cccd290834
commit baef0c291d
4 changed files with 296 additions and 33 deletions
+2 -1
View File
@@ -93,7 +93,8 @@ _MIN_DIGIT_COUNT :: max(3, ((size_of(u128) + _DIGIT_BITS) - 1) / _DIGIT_BITS);
- Must be small enough such that `_radix_size` for base 2 does not overflow.
`_radix_size` needs two additional bytes for zero termination and sign.
*/
_MAX_DIGIT_COUNT :: (max(int) - 2) / _DIGIT_BITS;
_MAX_BIT_COUNT :: (max(int) - 2);
_MAX_DIGIT_COUNT :: _MAX_BIT_COUNT / _DIGIT_BITS;
when size_of(rawptr) == 8 {
/*