{"versions":{"2.0.6":{"name":"add","version":"2.0.6","description":"","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","faithful","rounding","float","error","propagation","summation","accumulate","addition","numerical","analysis"],"devDependencies":{"tape":"2.x.x"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6"]},"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","_id":"add@2.0.6","_shasum":"248f0a9f6e5a528ef2295dbeec30532130ae2235","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"anonymous","email":"me@benng.me"},"maintainers":[{"name":"anonymous","email":"me@benng.me"},{"name":"anonymous","email":"joey@byjoeybaker.com"}],"dist":{"shasum":"248f0a9f6e5a528ef2295dbeec30532130ae2235","size":3567,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.6.tgz"},"directories":{},"publish_time":1405405777938,"_cnpm_publish_time":1405405777938,"_hasShrinkwrap":false,"contributors":[]},"2.0.5":{"name":"add","version":"2.0.5","description":"","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","faithful","founding","float","error","propagation","summation","accumulate","addition","numerical","analysis"],"devDependencies":{"tape":"2.x.x"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","gitHead":"266a98b62580ccc1b380b4bb30fdfc0dd8dc3597","_id":"add@2.0.5","_shasum":"cb11afb8fbca507d40816ddc3c58f9be9bfd2105","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"anonymous","email":"me@benng.me"},"maintainers":[{"name":"anonymous","email":"me@benng.me"},{"name":"anonymous","email":"joey@byjoeybaker.com"}],"dist":{"shasum":"cb11afb8fbca507d40816ddc3c58f9be9bfd2105","size":3284,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.5.tgz"},"directories":{},"publish_time":1403908258659,"_cnpm_publish_time":1403908258659,"_hasShrinkwrap":false,"contributors":[]},"2.0.4":{"name":"add","version":"2.0.4","description":"","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","faithful","founding","float","error","propagation","summation","accumulate","addition","numerical","analysis"],"devDependencies":{"tape":"2.x.x"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","gitHead":"3abd9ba4a2688a36f29ba221cf9ac3dcfe040cde","_id":"add@2.0.4","_shasum":"682bc31e70aa3572335cf67990a398e36ebee62a","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"anonymous","email":"me@benng.me"},"maintainers":[{"name":"anonymous","email":"me@benng.me"},{"name":"anonymous","email":"joey@byjoeybaker.com"}],"dist":{"shasum":"682bc31e70aa3572335cf67990a398e36ebee62a","size":3217,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.4.tgz"},"directories":{},"publish_time":1403865922910,"_cnpm_publish_time":1403865922910,"_hasShrinkwrap":false,"contributors":[]},"2.0.2":{"name":"add","version":"2.0.2","description":"","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","error","propagation","summation","accumulate","addition","analysis"],"devDependencies":{"tape":"2.x.x"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","gitHead":"10128a287197634a15988d1f8df6e583cef49c23","_id":"add@2.0.2","_shasum":"4001a5dd6198975735f2aba4d71dcb8f94f3692e","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"anonymous","email":"me@benng.me"},"maintainers":[{"name":"anonymous","email":"me@benng.me"},{"name":"anonymous","email":"joey@byjoeybaker.com"}],"dist":{"shasum":"4001a5dd6198975735f2aba4d71dcb8f94f3692e","size":3205,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.2.tgz"},"directories":{},"publish_time":1403865354827,"_cnpm_publish_time":1403865354827,"_hasShrinkwrap":false,"contributors":[]},"2.0.1":{"name":"add","version":"2.0.1","description":"","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","error","propagation","summation","accumulate","addition","analysis"],"devDependencies":{"tape":"^2.13.3"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","gitHead":"8cac4799357e0b709461c9afcbb1ea75a295e7a3","_id":"add@2.0.1","_shasum":"efcb1eb728f352002955f85031bf56f4380ab2b5","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"anonymous","email":"me@benng.me"},"maintainers":[{"name":"anonymous","email":"me@benng.me"},{"name":"anonymous","email":"joey@byjoeybaker.com"}],"dist":{"shasum":"efcb1eb728f352002955f85031bf56f4380ab2b5","size":3213,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.1.tgz"},"directories":{},"publish_time":1403863953973,"_cnpm_publish_time":1403863953973,"_hasShrinkwrap":false,"contributors":[]},"2.0.0":{"name":"add","version":"2.0.0","description":"","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","error","propagation","summation","accumulate","addition","analysis"],"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","gitHead":"2ea18e69e9592bb3c6a00de86236f039b89d43bb","_id":"add@2.0.0","_shasum":"38e813d2a9440770f668f1083efdcc536c550564","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"anonymous","email":"me@benng.me"},"maintainers":[{"name":"anonymous","email":"me@benng.me"},{"name":"anonymous","email":"joey@byjoeybaker.com"}],"dist":{"shasum":"38e813d2a9440770f668f1083efdcc536c550564","size":2941,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.0.tgz"},"directories":{},"publish_time":1403862282951,"_cnpm_publish_time":1403862282951,"_hasShrinkwrap":false,"contributors":[]},"1.0.0":{"name":"add","version":"1.0.0","description":"","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/add.git"},"main":"index","homepage":"https://github.com/Raynos/add","contributors":[{"name":"Raynos"}],"bugs":{"url":"https://github.com/Raynos/add/issues","email":"raynos2@gmail.com"},"dependencies":{},"devDependencies":{"tape":"~2.1.0"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/add/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","_id":"add@1.0.0","dist":{"shasum":"0d366278d2322aa534c37adfed98c3401522312e","size":1791,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"anonymous","email":"raynos2@gmail.com"},"maintainers":[{"name":"anonymous","email":"me@benng.me"},{"name":"anonymous","email":"joey@byjoeybaker.com"}],"directories":{},"publish_time":1384469379238,"_hasShrinkwrap":false,"_cnpm_publish_time":1384469379238},"2.0.7":{"name":"add","version":"2.0.7","description":"A cross-browser, numerically stable algorithm to add floats accurately","main":"index.js","scripts":{"test":"node test.js","benchmark":"node benchmark.js"},"repository":{"type":"git","url":"git+https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","faithful","rounding","float","error","propagation","summation","accumulate","addition","numerical","analysis"],"devDependencies":{"tape":"2.x.x","benchmark":"~1.0.0"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6"]},"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","gitHead":"fd36afd296b1072390a95cb9aaaa1acd14acf046","_id":"add@2.0.7","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-/xi4IEkE1qnEkVZZe+OJ6pQV23yyuIABa02TDAgu8A13+PBldrbgjFhEz8DoySMVXCzgzefEpA3kzayW+w9mJQ==","shasum":"5308b223ea4d4215af30eacd383ba7ded0ebdaa1","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.7.tgz","fileCount":7,"unpackedSize":9944,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC40BGZLnyFzQ0s8f9Y/+HWb4tth4q2mp+rwY9c04wm1AiA1kNns0MOTKoEK8gLYcUGN5F+8roi1p49sjV065FisyQ=="}],"size":4223},"_npmUser":{"name":"anonymous","email":"ngbenkw@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"ngbenkw@gmail.com"},{"name":"anonymous","email":"joey@byjoeybaker.com"},{"name":"anonymous","email":"silviu.avram91@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/add_2.0.7_1784430884037_0.0392470007309178"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-19T03:14:44.178Z","publish_time":1784430884178,"_source_registry_name":"default","contributors":[]},"2.0.8":{"name":"add","version":"2.0.8","description":"A cross-browser, numerically stable algorithm to add floats accurately","main":"index.js","scripts":{"test":"node test.js","benchmark":"node benchmark.js"},"repository":{"type":"git","url":"git+https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","faithful","rounding","float","error","propagation","summation","accumulate","addition","numerical","analysis"],"devDependencies":{"tape":"2.x.x","benchmark":"~1.0.0"},"testling":{"files":"test.js","browsers":["ie/6..latest","chrome/22..latest","firefox/16..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6"]},"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","gitHead":"20b84a11e2d5e5d554999a92157d0c0805e88bab","_id":"add@2.0.8","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-CZfHPYTqpmCXPmrdRlWkSoqXhqjRxYx9KeYnSeFBUcT6FzYqq+T+JcUoYJaPJ4dNF1HIk8g+CwjYoAWJig0asg==","shasum":"e7558243042f4655b328508dcf251f8dc5c18197","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.8.tgz","fileCount":7,"unpackedSize":10284,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIQCkTRzTvtDOeo6N0KXCwD9RDIZN65TxsJ+KB9Lr9oNTKgIfFLVGQvEODxMu34i2xg6VgS4WPRpAe8esD0TsmYk5sA=="}],"size":4306},"_npmUser":{"name":"anonymous","email":"ngbenkw@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"ngbenkw@gmail.com"},{"name":"anonymous","email":"joey@byjoeybaker.com"},{"name":"anonymous","email":"silviu.avram91@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/add_2.0.8_1784442166130_0.8543170168529772"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-19T06:22:46.274Z","publish_time":1784442166274,"_source_registry_name":"default","contributors":[]},"2.0.9":{"name":"add","version":"2.0.9","description":"A cross-browser, numerically stable algorithm to add floats accurately","main":"index.js","scripts":{"test":"node test.js","benchmark":"node benchmark.js"},"repository":{"type":"git","url":"git+https://github.com/ben-ng/add.git"},"keywords":["numerically","stable","faithful","rounding","float","error","propagation","summation","accumulate","addition","numerical","analysis"],"devDependencies":{"tape":"2.x.x","benchmark":"~1.0.0"},"author":{"name":"Ben Ng","email":"me@benng.me"},"license":"MIT","bugs":{"url":"https://github.com/ben-ng/add/issues"},"homepage":"https://github.com/ben-ng/add","gitHead":"1332ab92bbdf38a82b977db1c6382c42a93a1521","_id":"add@2.0.9","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-a6+u7hP0xmII7EBQenAIb6oMp9/vcW6EmrsD0ngUbLnE69Xtwj4yCbmHLUi5LZ6ggJB+AufHTaDbW1XBiYJwFw==","shasum":"35bd7a6404d966435919bd8413d11895cf28666d","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/add/-/add-2.0.9.tgz","fileCount":7,"unpackedSize":10373,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGimMYcMnNuZLyDXjtmJ6PUw84kg+Lzk8k84mpzw4a1WAiEA27eJd2Vy5L6lvn/ai9vMKVe/flh2f2UVB6/KZyViWMI="}],"size":4381},"_npmUser":{"name":"anonymous","email":"ngbenkw@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"ngbenkw@gmail.com"},{"name":"anonymous","email":"joey@byjoeybaker.com"},{"name":"anonymous","email":"silviu.avram91@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/add_2.0.9_1784444375756_0.9825653378296351"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-19T06:59:35.892Z","publish_time":1784444375892,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"2.0.9"},"name":"add","time":{"modified":"2026-07-19T07:14:23.654Z","created":"2022-01-26T21:03:30.032Z","2.0.6":"2014-07-15T06:29:37.938Z","2.0.5":"2014-06-27T22:30:58.659Z","2.0.4":"2014-06-27T10:45:22.910Z","2.0.2":"2014-06-27T10:35:54.827Z","2.0.1":"2014-06-27T10:12:33.973Z","2.0.0":"2014-06-27T09:44:42.951Z","1.0.0":"2013-11-14T22:49:39.238Z","2.0.7":"2026-07-19T03:14:44.178Z","2.0.8":"2026-07-19T06:22:46.274Z","2.0.9":"2026-07-19T06:59:35.892Z"},"readme":"# Add\n\n[![Test](https://github.com/ben-ng/add/actions/workflows/test.yml/badge.svg)](https://github.com/ben-ng/add/actions/workflows/test.yml)\n[![npm downloads](https://img.shields.io/npm/dm/add)](https://www.npmjs.com/package/add)\n\nA cross-browser, numerically stable way to add floats in Javascript. Produces a faithful rounding of the sum (the result is an immediate floating-point neighbor of the true value).\n\nAlgorithm: Rump-Ogita-Oishi\n\n## Usage\n\n```javascript\nvar add = require('add')\n  , evil = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7]\n  , dumbsum = function (a,b) { return a+b }\n\nconsole.log(evil.reduce(dumbsum)) => 15.299999999999999\n\nconsole.log(add(evil)) => 15.3\n```\n\n## Performance\n\nThe performance benchmark tesll you how much slower `add` is compared to dumb addition. Run it using:\n\n```bash\n$ npm run benchmark\n```\n\nHere are some results (Arch Linux, 5.2 GHz Core i9, 32GB LPDDR5 4800MT/s RAM):\n\n```bash\nadd-precise x 20,809,997 ops/sec ±1.04% (91 runs sampled)\nadd-dumb x 62,114,333 ops/sec ±0.37% (99 runs sampled)\nnative x 221,208,610 ops/sec ±0.35% (102 runs sampled)\nnative is ~10.6 times faster than add-precise\n```\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Ben Ng\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","users":{}}