int is an arbitrary size integer library written in javascript for node.js and browsers.
npm install int
var int = require('int');
var large = int('1234567890').mul('1234567890');
console.log(large.toString());
//'1524157875019052100'
// other cool stuff
var add_me = int('123456').add('-123456');
var power_up = int(2).pow(10);
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