BigInt now has a digits method (read comments)
Kind of unnecessary but included for completenesspull/16/head
parent
986ebac47f
commit
bb0fe2ac20
|
@ -106,6 +106,12 @@ function bigint.abs(big)
|
||||||
return result
|
return result
|
||||||
end
|
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
|
-- Convert a big to a number or string
|
||||||
function bigint.unserialize(big, output_type, precision)
|
function bigint.unserialize(big, output_type, precision)
|
||||||
bigint.check(big)
|
bigint.check(big)
|
||||||
|
|
Loading…
Reference in New Issue