BigInt now has a digits method (read comments)

Kind of unnecessary but included for completeness
pull/16/head
Ishaan Bhardwaj 2021-02-08 16:56:06 -05:00
parent 986ebac47f
commit bb0fe2ac20
1 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,12 @@ function bigint.abs(big)
return result
end
-- Return the number of digits in the big
function bigint.digits(big)
bigint.check(big)
return #big.digits
end
-- Convert a big to a number or string
function bigint.unserialize(big, output_type, precision)
bigint.check(big)