package
arbitrary precision integer and library in javascript
npm install intGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Besides the int function, all of the other methods operate on the objects returned by int
construct a new aribtrary precision integer
valid values are native numbers, strings, or int objects. Anything after a decimal point will be discarded
add {value} to our number and return a new int
subtract {value} from our number and return a new int
multiply our int by {value} and return a new int
divide our int by {value} and return a new int (can truncate)
raise our int by {value} and return a new int
mod our int by {value} and return the new int
return a new int that is the negative
return a new int that is the absolute value
compare our value to {value}
return 0 if self and value are equal, -1 if self < value, 1 if self > value
return true if self < value
return true if self <= value
return true if self > value
return true if self >= value
return true if self == value
return true if self != value