mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 16:39:02 -06:00
BigInt now has a digits method (read comments)
Kind of unnecessary but included for completeness
This commit is contained in:
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
Block a user