{"_id":"numbers","_rev":"26-bded4a05e0a93b7a73195d0975efc45c","name":"numbers","description":"Advanced Mathematics Library for JavaScript","dist-tags":{"latest":"0.7.0"},"versions":{"0.0.1":{"author":{"name":"Steve Kaliski","email":"sjkaliski@gmail.com","url":"https://github.com/sjkaliski"},"name":"numbers","description":"Advanced Mathematics Library for JavaScript","version":"0.0.1","homepage":"https://github.com/sjkaliski/numbers.js","repository":{"type":"git","url":"git://github.com/sjkaliski/numbers.js"},"contributors":[{"name":"David Byrd","url":"https://github.com/davidbyrd11"},{"name":"Ethan Resnick","url":"https://github.comc/ethanresnick"}],"engines":{"node":">= v0.6.0"},"main":"index","keywords":["math","mathematics","numbers","statistics"],"dependencies":{"mocha":"~1.5.0"},"scripts":{"test":"make test"},"_id":"numbers@0.0.1","dist":{"shasum":"298b93ce457edd5330410c0a9b111c7617aa0f9a","tarball":"https://registry.npmjs.org/numbers/-/numbers-0.0.1.tgz","integrity":"sha512-Hv5cRjT5Gj2WhMoAq446Avk0jOvtGTczueL1QsAIuPsdWU9gNHeLH7t+EPXKqxialQDDkNMC7W/wrgPIx9eDDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWsznIOxmjHog2TskRTBRIihcXgDbmyrUIO6nVonXCigIgKOvx9JsaGadjsPhVyxZygS8VcFFJISGKSM0MhL+Ffuc="}]},"maintainers":[{"name":"sjkaliski","email":"sjkaliski@gmail.com"}],"directories":{}},"0.0.2":{"author":{"name":"Steve Kaliski","email":"sjkaliski@gmail.com","url":"https://github.com/sjkaliski"},"name":"numbers","description":"Advanced Mathematics Library for JavaScript","version":"0.0.2","homepage":"https://github.com/sjkaliski/numbers.js","repository":{"type":"git","url":"git://github.com/sjkaliski/numbers.js"},"contributors":[{"name":"David Byrd","url":"https://github.com/davidbyrd11"},{"name":"Ethan Resnick","url":"https://github.comc/ethanresnick"}],"engines":{"node":">= v0.6.0"},"main":"index","keywords":["math","mathematics","numbers","statistics"],"dependencies":{"mocha":"~1.5.0"},"scripts":{"test":"make test"},"_id":"numbers@0.0.2","dist":{"shasum":"900fe19ac4f6bad06f502353d932392372283392","tarball":"https://registry.npmjs.org/numbers/-/numbers-0.0.2.tgz","integrity":"sha512-XNYvSPxtZA0bEMOWqsO/72bAdLBABUdmhxKovWD/LH0UJ2moz3Rw5niWlxjd3fx91hbF0YesUlF9lZo6r1m0lw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyAukO1g5zQJ0jpSvVnDxn0J0mqliB2MjjFU6cXVj3YAIgMbaqMJt3YeuVUzX/sc6drNv6xBepNOhlVQMrSBrpzIw="}]},"maintainers":[{"name":"sjkaliski","email":"sjkaliski@gmail.com"}],"directories":{}},"0.4.0":{"author":{"name":"Steve Kaliski","email":"sjkaliski@gmail.com","url":"https://github.com/sjkaliski"},"name":"numbers","description":"Advanced Mathematics Library for JavaScript","version":"0.4.0","homepage":"https://github.com/sjkaliski/numbers.js","repository":{"type":"git","url":"git://github.com/sjkaliski/numbers.js"},"contributors":[{"name":"David Byrd","url":"https://github.com/davidbyrd11"},{"name":"Ethan Resnick","url":"https://github.comc/ethanresnick"}],"engines":{"node":">= v0.6.0"},"main":"index","keywords":["math","mathematics","numbers","statistics"],"devDependencies":{"mocha":"~1.5.0","browserify":"~1.16.6","uglify-js":"~2.2.2","jshint":"~0.9.1"},"scripts":{"test":"make test","build":"make build"},"_id":"numbers@0.4.0","dist":{"shasum":"a46d2d3c431b3d334363a728d3886b608ee0c2c3","tarball":"https://registry.npmjs.org/numbers/-/numbers-0.4.0.tgz","integrity":"sha512-y6O852INdWclqHMfCO/+HbQ9kGcGHuIMjDG3gNK4wClZ1FQowWaWFvMNJ0zc28pTDvCsBpEM8PGKx0/YiRxd5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxYuBUDVJdOQluoUsGPOiTrxXrbG5lQXcfUNEGfYxUpAiEAxcxXgZBoYar4brEmalMj67HCOD8F24M54xli/2AKkyc="}]},"maintainers":[{"name":"sjkaliski","email":"sjkaliski@gmail.com"}],"directories":{}},"0.5.0":{"author":{"name":"Steve Kaliski","email":"sjkaliski@gmail.com","url":"https://github.com/sjkaliski"},"name":"numbers","description":"Advanced Mathematics Library for JavaScript","version":"0.5.0","homepage":"https://github.com/sjkaliski/numbers.js","repository":{"type":"git","url":"git://github.com/sjkaliski/numbers.js"},"contributors":[{"name":"David Byrd","url":"https://github.com/davidbyrd11"},{"name":"Ethan Resnick","url":"https://github.comc/ethanresnick"},{"name":"Dakota St. Laurant","url":"https://github.com/StDako"},{"name":"Kartik Talwar","url":"https://github.com/KartikTalwar"}],"engines":{"node":">= v0.6.0"},"main":"index","keywords":["math","mathematics","numbers","statistics"],"devDependencies":{"mocha":"~1.8.0","browserify":"~1.16.6","uglify-js":"~2.2.2","jshint":"~0.9.1"},"scripts":{"test":"make test","build":"make build"},"bugs":{"url":"https://github.com/sjkaliski/numbers.js/issues"},"_id":"numbers@0.5.0","dist":{"shasum":"888589f3e917afc461a2328a866727b1a7b8da80","tarball":"https://registry.npmjs.org/numbers/-/numbers-0.5.0.tgz","integrity":"sha512-+KhH0rm/7qyijUCFR5yxKUTzNPWlxYf+l97vXOIlxHCTJQrbibRFtBDzIlcL2YEB+S8XntTJwCJ24XS5ZYCy7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICgzoWMOw4TpdJLIGdyVJuHZ5xR85ve2FhXZJ9XO7zntAiEAiPooTpw95KoGlzac92eoIVMM4aVAj3Y/ItY1zulu8dw="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"sjkaliski","email":"sjkaliski@gmail.com"},"maintainers":[{"name":"sjkaliski","email":"sjkaliski@gmail.com"}],"directories":{}},"0.6.0":{"author":{"name":"Steve Kaliski","email":"sjkaliski@gmail.com","url":"https://github.com/sjkaliski"},"name":"numbers","description":"Advanced Mathematics Library for JavaScript","version":"0.6.0","homepage":"https://github.com/numbers/numbers.js","repository":{"type":"git","url":"git://github.com/numbers/numbers.js"},"contributors":[{"name":"David Byrd","url":"https://github.com/davidbyrd11"},{"name":"Ethan Resnick","url":"https://github.comc/ethanresnick"},{"name":"Dakota St. Laurent","url":"https://github.com/StDako"},{"name":"Kartik Talwar","url":"https://github.com/KartikTalwar"},{"name":"Larry Battle","url":"https://github.com/LarryBattle"}],"engines":{"node":">= v0.6.0"},"main":"index","keywords":["math","mathematics","numbers","statistics"],"devDependencies":{"browserify":"~5.12.1","del":"~0.1.3","gulp":"~3.8.8","gulp-jsbeautifier":"0.0.3","gulp-jshint":"~1.8.4","gulp-mocha":"~1.1.0","gulp-rename":"~1.2.0","gulp-uglify":"~1.0.1","jshint-stylish":"~1.0.0","mocha":"~1.8.0","seedrandom":"~2.3.10","uglify-js":"~2.2.2","vinyl-buffer":"~1.0.0","vinyl-source-stream":"~1.0.0"},"scripts":{"build":"gulp build","format":"gulp format","lint":"gulp lint","test":"gulp test"},"bugs":{"url":"https://github.com/numbers/numbers.js/issues"},"_id":"numbers@0.6.0","dist":{"shasum":"fd4af298e748b47d617305a9133a4c1302b8d9af","tarball":"https://registry.npmjs.org/numbers/-/numbers-0.6.0.tgz","integrity":"sha512-EA4GX/m/7dhySwcJG0STTBuBG2QLEGpd6fLOIVkdAjkJX9h7Iz1MpmvmkGwJdzfU0r/n2XEJvoeafrPgLanFDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr7PsVVLnie3XPMXuJA7xHgO1yVIQjnUjIgs5JsSIYygIhALyBlnNvy5SSB3rLaOuoOZne6KKa8A2fYrWtcgHinwG4"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"sjkaliski","email":"sjkaliski@gmail.com"},"maintainers":[{"name":"sjkaliski","email":"sjkaliski@gmail.com"}],"directories":{}},"0.7.0":{"author":{"name":"Steve Kaliski","email":"sjkaliski@gmail.com","url":"https://github.com/sjkaliski"},"name":"numbers","description":"Advanced Mathematics Library for JavaScript","version":"0.7.0","homepage":"https://github.com/numbers/numbers.js","repository":{"type":"git","url":"git://github.com/numbers/numbers.js.git"},"contributors":[{"name":"David Byrd","url":"https://github.com/davidbyrd11"},{"name":"Ethan Resnick","url":"https://github.comc/ethanresnick"},{"name":"Dakota St. Laurent","url":"https://github.com/StDako"},{"name":"Kartik Talwar","url":"https://github.com/KartikTalwar"},{"name":"Larry Battle","url":"https://github.com/LarryBattle"}],"engines":{"node":">= v0.6.0"},"main":"index","keywords":["math","mathematics","numbers","statistics"],"devDependencies":{"browserify":"^16.2.2","del":"^3.0.0","gulp":"^4.0.0","gulp-jsbeautifier":"^1.0.1","gulp-jshint":"^2.1.0","gulp-mocha":"^6.0.0","gulp-rename":"~1.2.0","gulp-uglify":"^3.0.0","jshint":"^2.8.0","jshint-stylish":"^2.0.1","mocha":"^5.2.0","seedrandom":"~2.3.10","uglify-js":"^3.4.4","vinyl-buffer":"~1.0.0","vinyl-source-stream":"~1.0.0"},"scripts":{"build":"npm run clean && npm run concat && npm run minimize","clean":"rm -r src/*","concat":"browserify -s numbers index.js -o ./src/numbers.js","format:lib":"js-beautify -r -n -a -s 2 ./lib/**/*.js","format:test":"js-beautify -r -n -a -s 2 ./test/*.js","format":"npm run format:lib && npm run format:test","lint:lib":"jshint --reporter=node_modules/jshint-stylish ./lib/**/*.js","lint:test":"jshint --reporter=node_modules/jshint-stylish ./test/*.js","lint":"npm run lint:lib && npm run lint:test","minimize":"uglify -s ./src/numbers.js -o ./src/numbers.min.js","test":"mocha -u tdd","g-build":"gulp build","g-format":"gulp format","g-lint":"gulp lint","g-test":"gulp test"},"gitHead":"7a9be40959547e2691677df6fbe2a9cad24908cc","bugs":{"url":"https://github.com/numbers/numbers.js/issues"},"_id":"numbers@0.7.0","_npmVersion":"6.1.0","_nodeVersion":"10.6.0","_npmUser":{"name":"sjkaliski","email":"sjkaliski@gmail.com"},"dist":{"integrity":"sha512-bdHRauOohlyg20dLiOitEJrXVs4xtu4GeDeKyChkWSfMeDLM39lUDcaOShSdmxqt4Ihu9syh480Fx/EiDY5zYQ==","shasum":"05f3f239a2a22d0064e2a313ab3a4236298bb1d1","tarball":"https://registry.npmjs.org/numbers/-/numbers-0.7.0.tgz","fileCount":33,"unpackedSize":268825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbRsH/CRA9TVsSAnZWagAAFx4P/28gZUu4eihyN/eOn01b\n0dJFugtX+b8qyTVvT+N1fzhDzpZX0Zl9yIBmPheYJjebl89w7ttiZAVHHNcQ\n7V43h4bQiNjgN0Ibzie00hkseLComZX1Rz/0xM7kha/FG3Cko8ryCaX9gVbj\nBMMXEFf2FKXQzASDIAhkpFTceRxEubyu2iqq6S2FYYSdmhWXgCG5q7/zshq8\nOPORvc75KLQGKmgxYicKSBftEJFnq3/OX2BBEFmGxvmw/mX4Vey4Tmoiy2OQ\nufbtQ62WnP6WlhSTG92yj/hrpk4aOT7iluAIzgR9fdyBtY7jcgUwM4I0C/tw\nwSMZnfI6erccAoBPfViT/1dMret4zdywBIwGlp7ZcvKEUJGbjiKFogvofT+V\nMfaK5Lf0t7KWATdps40K2yB2Dki9Jcp/025StKnkB6WMBe9ic/kRKh8Lg8G2\njS5rjTCbuOC+hXeG07EyB6kgaFZ2xgy8cXD9hLpJ8QBjup2I2KhLszVPdnBM\noQ1EkImS/Dh7Ow7rODBOj/syV0bFadAhO3VioyN7dL9qxe/8dU4HcBIjznGG\nfhTUAJYeMkG6JWGkQIcAhsqRxHT6+Qn7QtjbLXtbp+3ANYU8RO+n1VhRbH3e\nvGVS+NGCZxcTRwX0hF4uHCLUGzPSSiqPsDcSL+byTj5+rwESud0BYgZjezk4\n1bSQ\r\n=oaOc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHbd5osrJ01WjuUIENQ3Sf+TA+W/JXlYuqbfF+iPcge1AiAndxiYsykVKJdB5yOhIKB4IMzIJfNXVYhHCWymmGFm7Q=="}]},"maintainers":[{"name":"sjkaliski","email":"sjkaliski@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/numbers_0.7.0_1531363839221_0.9490607903181354"},"_hasShrinkwrap":false}},"readme":"# numbers.js [![Build Status](https://travis-ci.org/numbers/numbers.js.png)](https://travis-ci.org/numbers/numbers.js)\nNumbers - an advanced mathematics toolkit for JavaScript and Node.js.\n\n\n## Description\n\nNumbers provides a comprehensive set of mathematical tools that currently are not offered in JavaScript.  These tools include:\n\n* Basic calculations\n* Calculus\n* Matrix Operations\n* Prime Numbers\n* Statistics\n* More...\n\nA few things to note before using: JavaScript, like many languages, does not necessarily manage floating points as well as we'd all like it to. For example, if adding decimals, the addition tool won't return the exact value. This is an unfortunate error. Precautions have been made to account for this. After including numbers, you can set an error bound. Anything in this will be considered an \"acceptable outcome.\"\n\nThe primary uses cases are client side operations which the DOM will recognize (e.g. 1.1px == 1px). It can be used for data analysis, calculations, etc. on the server as well.\n\n## How to use\n\nNumbers is pretty straightforward to use.\n\nWith node, simply require it:\n```javascript\nvar numbers = require('numbers');\n```\n\nFor example, if we wanted to estimate the integral of sin(x) from -2 to 4, we could:\n\nUse Riemann integrals (with 200 subdivisions)\n\n```javascript\nnumbers.calculus.Riemann(Math.sin, -2, 4, 200);\n```\n\nOr use adaptive simpson quadrature (with epsilon .0001)\n\n```javascript\nnumbers.calculus.adaptiveSimpson(Math.sin, -2, 4, .0001);\n```\n\nUser-defined functions can be used too:\n\n```\nvar myFunc = function(x) {\n  return 2*Math.pow(x,2) + 1;\n}\n\nnumbers.calculus.Riemann(myFunc, -2, 4, 200);\nnumbers.calculus.adaptiveSimpson(myFunc, -2, 4, .0001);\n```\n\nNow say we wanted to run some matrix calculations:\n\nWe can add two matrices\n\n```javascript\nvar array1 = [0, 1, 2];\nvar array2 = [3, 4, 5];\n\nnumbers.matrix.addition(array1, array2);\n```\n\nWe can transpose a matrix\n\n```javascript\nnumbers.matrix.transpose(array);\n```\n\nWhen working with vectors, treat them like single row matrices:\n\n```javascript\nvar vector1 = [[1, 0, 0]];\n```\n\nNumbers also includes some basic prime number analysis.  We can check if a number is prime:\n\n```javascript\n// basic check\nnumbers.prime.simple(number);\n\n// Miller-Rabin primality test\nnumbers.prime.millerRabin(number);\n```\n\nThe statistics tools include mean, median, mode, standard deviation, random sample generator, correlation, confidence intervals, t-test, chi-square, and more.\n\n```javascript\nnumbers.statistic.mean(array);\nnumbers.statistic.median(array);\nnumbers.statistic.mode(array);\nnumbers.statistic.standardDev(array);\nnumbers.statistic.randomSample(lower, upper, n);\nnumbers.statistic.correlation(array1, array2);\n```\nFor further documentation, check out [numbers.github.io](http://numbers.github.io/)\n\n## Test\n\nTo execute, run:\n\n```\nnpm test\n```\n\nNote: Make sure to install the plugins by running `npm install`.\n\nWith gulp:\n\n```\nnpm run g-test\n```\n\n## Lint\n\nTo perform a code quality check using jshint, run \n\n```\nnpm run lint\n```\n\nor, with gulp:\n\n```\nnpm run g-lint\n```\n\nRunning without gulp will error on warnings.\n\n## Format Code\n\nTo format all the tests and lib files using jsbeautifier, run \n\n```\nnpm run format\n```\n\nor, with gulp:\n\n```\nnpm run g-format\n```\n\n## Build\n\nTo update the public JavaScript, run\n\n```\nnpm run build\n```\n\nThis will compile the entire library into a single file accessible at src/numbers.js. It will also minify the file into public/numbers.min.js.\n\nWith gulp:\n\n```\nnpm run g-build\n```\n\nNumbers.js is also available on Bower via\n\n```\n$ bower install numbers.js\n```\n\n## Core Team\n* Steve Kaliski - [@stevekaliski](http://twitter.com/stevekaliski)\n* David Byrd - [@thebyrd](http://twitter.com/thebyrd)\n* Ethan Resnick - [@studip101](http://twitter.com/studip101)\n* Dakota St. Laurent - [@SaintDako](https://github.com/SaintDako)\n* Kartik Talwar - [@KartikTalwar](https://github.com/KartikTalwar)\n\n## Contributors\nIn no particular order:\n* [Ethan aka `altercation`](https://github.com/altercation)\n* [Hrishikesh Paranjape aka `hrishikeshparanjape`](https://github.com/hrishikeshparanjape)\n* [Greg Leppert aka `leppert`](https://github.com/leppert)\n* [Lars-Magnus Skog aka `ralphtheninja`](https://github.com/ralphtheninja)\n* [Tim Wood aka `codearachnid`](https://github.com/codearachnid)\n* [Miles McCrocklin aka `milroc`](https://github.com/milroc)\n* [Nate Kohari aka `nkohari`](https://github.com/nkohari)\n* [Eric LaForce aka `elaforc`](https://github.com/elaforc)\n* [btmills aka `btmills`](https://github.com/btmills)\n* [swair shah aka `swairshah`](https://github.com/swairshah)\n* [Jason Hutchinson aka `Zikes`](https://github.com/Zikes)\n* [Philip I. Thomas aka `philipithomas`](https://github.com/philipithomas)\n* [Brandon Benvie aka `Benvie`](https://github.com/Benvie)\n* [Larry Battle aka `LarryBattle`](https://github.com/LarryBattle)\n","maintainers":[{"name":"sjkaliski","email":"sjkaliski@gmail.com"}],"time":{"modified":"2022-06-22T13:34:12.068Z","created":"2012-12-10T20:19:19.106Z","0.0.1":"2012-12-10T20:19:19.931Z","0.0.2":"2012-12-10T22:38:19.810Z","0.4.0":"2012-12-24T18:51:04.778Z","0.5.0":"2014-07-30T01:18:18.794Z","0.6.0":"2015-02-17T21:30:38.405Z","0.7.0":"2018-07-12T02:50:39.351Z"},"author":{"name":"Steve Kaliski","email":"sjkaliski@gmail.com","url":"https://github.com/sjkaliski"},"repository":{"type":"git","url":"git://github.com/numbers/numbers.js.git"},"users":{"rwoody":true,"tecfu":true,"hibrahimsafak":true,"memoramirez":true,"harrisonm":true,"detj":true,"benburwell":true,"tunderdomb":true,"panlw":true},"homepage":"https://github.com/numbers/numbers.js","keywords":["math","mathematics","numbers","statistics"],"contributors":[{"name":"David Byrd","url":"https://github.com/davidbyrd11"},{"name":"Ethan Resnick","url":"https://github.comc/ethanresnick"},{"name":"Dakota St. Laurent","url":"https://github.com/StDako"},{"name":"Kartik Talwar","url":"https://github.com/KartikTalwar"},{"name":"Larry Battle","url":"https://github.com/LarryBattle"}],"bugs":{"url":"https://github.com/numbers/numbers.js/issues"},"readmeFilename":"README.md"}