{"_id":"math-sqrt","_rev":"5-d9b0b5dc5ca7aed15740f8c4c542f700","name":"math-sqrt","description":"Computes the principal square root.","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"math-sqrt","version":"0.0.0","description":"Computes the principal square root.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"if [ \"${TRAVIS}\" ]; then npm run test-ci; else npm run test-local; fi","test-local":"tape \"./test/*.js\" | tap-spec","test-ci":"npm run test-local && xvfb-run npm run test-browsers","test-cov":"istanbul cover --dir ./reports/coverage --report lcov tape -- \"./test/*.js\"","test-browsers":"browserify ./test/*.js | testling | tap-spec","coverage":"istanbul cover --dir ./reports/codecov/coverage --report lcovonly tape -- \"./test/*.js\" && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/math-io/sqrt.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.sqrt","sqrt","square","root","power","value","scalar","number"],"bugs":{"url":"https://github.com/math-io/sqrt/issues"},"dependencies":{},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x"},"testling":{"files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"673c3b4e9a63718b282eceb000d2b95f3882079d","homepage":"https://github.com/math-io/sqrt#readme","_id":"math-sqrt@0.0.0","_shasum":"4d2ee611058682fe116d7aa87553d06adc2cf8f1","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"4d2ee611058682fe116d7aa87553d06adc2cf8f1","tarball":"https://registry.npmjs.org/math-sqrt/-/math-sqrt-0.0.0.tgz","integrity":"sha512-8zzyMdad62acea2TtpQPq1v7rUKgSoizJh0LWsENPEz9WuhYCYqtBRPYw41mv15Bvi9GFY3+uU6/eB9u1qe02w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDtIksPF8/ZfWONT3lAarz2cK9tnFyTpBxz7QWMCLrwhAiAmOuHxPm/xKmF3JecaFeqpgVGy4mg0fU6YXBqNaECkgw=="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.0":{"name":"math-sqrt","version":"1.0.0","description":"Computes the principal square root.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"if [ \"${TRAVIS}\" ]; then npm run test-ci; else npm run test-local; fi","test-local":"tape \"./test/*.js\" | tap-spec","test-ci":"npm run test-local && xvfb-run npm run test-browsers","test-cov":"istanbul cover --dir ./reports/coverage --report lcov tape -- \"./test/*.js\"","test-browsers":"browserify ./test/*.js | testling | tap-spec","coverage":"istanbul cover --dir ./reports/codecov/coverage --report lcovonly tape -- \"./test/*.js\" && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/math-io/sqrt.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.sqrt","sqrt","square","root","power","value","scalar","number"],"bugs":{"url":"https://github.com/math-io/sqrt/issues"},"dependencies":{},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x"},"testling":{"files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"9d5786c86ca524dcb5267c81ea46f4f9878836b4","homepage":"https://github.com/math-io/sqrt#readme","_id":"math-sqrt@1.0.0","_shasum":"d83b06c0969c82c84b5c021f77403d4319213969","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"d83b06c0969c82c84b5c021f77403d4319213969","tarball":"https://registry.npmjs.org/math-sqrt/-/math-sqrt-1.0.0.tgz","integrity":"sha512-VOdQomTV8LmP91CuDPwr1yJe3dVQon/pxG0O1kkwvOsMsc1pq2Cf43kPmip98dmypgl4IrPcrTo9Y9NpvXxvXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChn9ZxQqG5WeqFbMZQFB0JABFhFJHxzAaR9YOmkfgP0QIgTLTNAOriNN6VEvpkoO0ku/vSeUs/gDG4Cre8/eIYP24="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.1":{"name":"math-sqrt","version":"1.0.1","description":"Computes the principal square root.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"if [ \"${TRAVIS}\" ]; then npm run test-ci; else npm run test-local; fi","test-local":"tape \"./test/*.js\" | tap-spec","test-ci":"npm run test-local && xvfb-run npm run test-browsers","test-cov":"istanbul cover --dir ./reports/coverage --report lcov tape -- \"./test/*.js\"","test-browsers":"browserify ./test/*.js | testling | tap-spec","coverage":"istanbul cover --dir ./reports/codecov/coverage --report lcovonly tape -- \"./test/*.js\" && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/math-io/sqrt.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.sqrt","sqrt","square","root","power","value","scalar","number"],"bugs":{"url":"https://github.com/math-io/sqrt/issues"},"dependencies":{},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x"},"testling":{"files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"668b5c3a5069038963841fe6a80b1c00dc6b4421","homepage":"https://github.com/math-io/sqrt#readme","_id":"math-sqrt@1.0.1","_shasum":"37f5639d67d317d7273cdaae984c5d775a143425","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"37f5639d67d317d7273cdaae984c5d775a143425","tarball":"https://registry.npmjs.org/math-sqrt/-/math-sqrt-1.0.1.tgz","integrity":"sha512-9Tf6eZqSyPptAX/q7R5S3CytqLY228itWgC7hnK+FDn2oqIbbBPq9NavYhVE4BuKyy/YHAGoen+iMQXIij7FhA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnMGVMbF+rHmZsj3/rrz4Q3+2mpXUPLARiIZbKrxrsLgIgCH4AX+kFf46n7PX1BnKZRMIZlFfuI21VacZHxo2PQYk="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]}},"readme":"Square Root\n===\n[![NPM version][npm-image]][npm-url] [![Build Status][build-image]][build-url] [![Coverage Status][coverage-image]][coverage-url] [![Dependencies][dependencies-image]][dependencies-url]\n\n> Computes the principal [square root][square-root].\n\nThe principal [square root][square-root] is defined as\n\n<div class=\"equation\" align=\"center\" data-raw-text=\"\\sqrt{x^2} = \\begin{matrix} x, &amp; \\textrm{if}\\ x \\geq 0\\end{matrix}\" data-equation=\"eq:principal_square_root\">\n\t<img src=\"https://cdn.rawgit.com/math-io/sqrt/8e7861b1a304c4589279000f58c7f044c9dfedde/docs/img/eqn.svg\" alt=\"Principal square root definition.\">\n\t<br>\n</div>\n\n\n## Installation\n\n``` bash\n$ npm install math-sqrt\n```\n\n\n## Usage\n\n``` javascript\nvar sqrt = require( 'math-sqrt' );\n```\n\n#### sqrt( x )\n\nComputes the principal [square root][square-root].\n\n``` javascript\nvar val = sqrt( 4 );\n// returns 2\n\nval = sqrt( 9 );\n// returns 3\n\nval = sqrt( 0 );\n// returns 0\n```\n\nFor negative numbers, the principal [square root][square-root] is __not__ defined.\n\n``` javascript\nvar val = sqrt( -4 );\n// returns NaN\n```\n\n\n## Examples\n\n``` javascript\nvar sqrt = require( 'math-sqrt' );\n\nvar x;\nvar i;\n\nfor ( i = 0; i < 100; i++ ) {\n\tx = Math.round( Math.random() * 100 );\n\tconsole.log( sqrt( x ) );\n}\n```\n\nTo run the example code from the top-level application directory,\n\n``` bash\n$ node ./examples/index.js\n```\n\n\n---\n## Tests\n\n### Unit\n\nThis repository uses [tape][tape] for unit tests. To run the tests, execute the following command in the top-level application directory:\n\n``` bash\n$ make test\n```\n\nAll new feature development should have corresponding unit tests to validate correct functionality.\n\n\n### Test Coverage\n\nThis repository uses [Istanbul][istanbul] as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-cov\n```\n\nIstanbul creates a `./reports/coverage` directory. To access an HTML version of the report,\n\n``` bash\n$ make view-cov\n```\n\n\n### Browser Support\n\nThis repository uses [Testling][testling] for browser testing. To run the tests in a (headless) local web browser, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-browsers\n```\n\nTo view the tests in a local web browser,\n\n``` bash\n$ make view-browser-tests\n```\n\n<!-- [![browser support][browsers-image]][browsers-url] -->\n\n\n---\n## License\n\n[MIT license](http://opensource.org/licenses/MIT).\n\n\n## Copyright\n\nCopyright &copy; 2016. The [Compute.io][compute-io] Authors.\n\n\n[npm-image]: http://img.shields.io/npm/v/math-sqrt.svg\n[npm-url]: https://npmjs.org/package/math-sqrt\n\n[build-image]: http://img.shields.io/travis/math-io/sqrt/master.svg\n[build-url]: https://travis-ci.org/math-io/sqrt\n\n[coverage-image]: https://img.shields.io/codecov/c/github/math-io/sqrt/master.svg\n[coverage-url]: https://codecov.io/github/math-io/sqrt?branch=master\n\n[dependencies-image]: http://img.shields.io/david/math-io/sqrt.svg\n[dependencies-url]: https://david-dm.org/math-io/sqrt\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/math-io/sqrt.svg\n[dev-dependencies-url]: https://david-dm.org/dev/math-io/sqrt\n\n[github-issues-image]: http://img.shields.io/github/issues/math-io/sqrt.svg\n[github-issues-url]: https://github.com/math-io/sqrt/issues\n\n[tape]: https://github.com/substack/tape\n[istanbul]: https://github.com/gotwarlost/istanbul\n[testling]: https://ci.testling.com\n\n[compute-io]: https://github.com/compute-io/\n[square-root]: https://en.wikipedia.org/wiki/Square_root\n","maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"time":{"modified":"2022-06-19T16:40:13.054Z","created":"2016-01-08T13:41:40.098Z","0.0.0":"2016-01-08T13:41:40.098Z","1.0.0":"2016-01-08T13:42:05.394Z","1.0.1":"2016-01-10T11:22:17.192Z"},"homepage":"https://github.com/math-io/sqrt#readme","keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.sqrt","sqrt","square","root","power","value","scalar","number"],"repository":{"type":"git","url":"git://github.com/math-io/sqrt.git"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"bugs":{"url":"https://github.com/math-io/sqrt/issues"},"license":"MIT","readmeFilename":"README.md"}