"readme":"# BigInteger.js [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url] [![Monthly Downloads][downloads-img]][downloads-url]\r\n\r\n[travis-url]: https://travis-ci.org/peterolson/BigInteger.js\r\n[travis-img]: https://travis-ci.org/peterolson/BigInteger.js.svg?branch=master\r\n[coveralls-url]: https://coveralls.io/github/peterolson/BigInteger.js?branch=master\r\n[coveralls-img]: https://coveralls.io/repos/peterolson/BigInteger.js/badge.svg?branch=master&service=github\r\n[downloads-url]: https://www.npmjs.com/package/big-integer\r\n[downloads-img]: https://img.shields.io/npm/dm/big-integer.svg\r\n\r\n**BigInteger.js** is an arbitrary-length integer library for Javascript, allowing arithmetic operations on integers of unlimited size, notwithstanding memory and time limitations.\r\n\r\n## Installation\r\n\r\nIf you are using a browser, you can download [BigInteger.js from GitHub](http://peterolson.github.com/BigInteger.js/BigInteger.min.js) or just hotlink to it:\r\n\r\n\t<script src=\"http://peterolson.github.com/BigInteger.js/BigInteger.min.js\"></script>\r\n\r\nIf you are using node, you can install BigInteger with [npm](https://npmjs.org/).\r\n\r\n npm install big-integer\r\n\r\nThen you can include it in your code:\r\n\r\n\tvar bigInt = require(\"big-integer\");\r\n\r\n\r\n## Usage\r\n### `bigInt(number, [base])`\r\n\r\nYou can create a bigInt by calling the `bigInt` function. You can pass in\r\n\r\n - a string, which it will parse as an bigInt and throw an `\"Invalid integer\"` error if the parsing fails.\r\n - a Javascript number, which it will parse as an bigInt and throw an `\"Invalid integer\"` error if the parsing fails.\r\n - another bigInt.\r\n - nothing, and it will return `bigInt.zero`.\r\n\r\n If you provide a second parameter, then it will parse `number` as a number in base `base`. Note that `base` can be any bigInt (even negative or zero). The letters \"a-z\" and \"A-Z\" will be interpreted as the numbers 10 to 35. Higher digits can be specified in angle brackets (`<` and `>`).\r\n\r\nExamples:\r\n\r\n var zero = bigInt();\r\n var ninetyThree = bigInt(93);\r\n\tvar largeNumber = bigInt(\"75643564363473453456342378564387956906736546456235345\");\r\n\tvar googol = bigInt(\"1e100\");\r\n\tvar bigNumber = bigInt(largeNumber);\r\n\t \r\n\tvar maximumByte = bigInt(\"FF\", 16);\r\n\tvar fiftyFiveGoogol = bigInt(\"<55>0\",googol);\r\n\r\nNotethatJavascriptnumberslargerthan`9007199254740992`andsmallerthan`-9007199254740992`arenotpreciselyrepresentednumbersandwillnotproduceexactresults.Ifyouaredealingwithnumbersoutsidethatrange,itisbettertopassinstrings.\r\n\r\n###MethodChaining\r\n\r\nNotethatbigIntoperationsreturnbigInts,whichallowsyoutochainmethods,forexample:\r\n\r\nvarsalary=bigInt(dollarsPerHour).times(hoursWorked).plus(randomBonuses)\r\n\r\n###Constants\r\n\r\nTherearethreenamedconstantsalreadystoredthatyoudonothavetoconstructwiththe`bigInt`functionyourself:\r\n\r\n-`bigInt.one`,equivalentto`bigInt(1)`\r\n-`bigInt.zero`,equivalentto`bigInt(0)`\r\n-`bigInt.minusOne`,equivalentto`bigInt(-1)`\r\n\r\nThenumbersfrom-999to999arealsoalreadyprestoredandcanbeaccessedusing`bigInt[index]`,forexample:\r\n\r\n-`bigInt[-999]`,equivalentto`bigInt(-999)`\r\n-`bigInt[256]`,equivalentto`bigInt(256)`\r\n\r\n###Methods\r\n\r\n####`abs()`\r\n\r\nReturnstheabsolutevalueofabigInt.\r\n\r\n-`bigInt(-45).abs()`=>`45`\r\n-`bigInt(45).abs()`=>`45`\r\n\r\n####`add(number)`\r\n\r\nPerformsaddition.\r\n\r\n-`bigInt(5).add(7)`=>`12`\r\n\r\n[Viewbenchmarksforthismethod](http://peterolson.github.io/BigInteger.js/benchmark/#Addition)\r\n\r\n#### `and(number)`\r\n\r\nPerforms the bitwise AND operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement).\r\n\r\n - `bigInt(6).and(3)` => `2`\r\n - `bigInt(6).and(-3)` => `4`\r\n\r\n#### `compare(number)