bigIntDigitCount
bigIntDigitCount(
value,radix?):number
Defined in: big-int/digit-count.ts:16
How many digits |value| takes in radix — 1 for zero, which still reads
as one digit.
Base ten goes through bigIntLog10, which is O(log log n); any other radix has no such shortcut and materialises the numeral, which is O(n²/k) in the digit count.
Parameters
Section titled “Parameters”bigint
The value to measure. Its sign is ignored.
radix?
Section titled “radix?”number = 10
The base, from 2 to 36. Defaults to 10.
Returns
Section titled “Returns”number
The digit count, at least one.
Throws
Section titled “Throws”If radix is not an integer in [2, 36].