{"_id":"math-float64-exponent","_rev":"4-037c8489458cd064dac74acb35ed04ad","name":"math-float64-exponent","description":"Returns an integer corresponding to the unbiased exponent of a double-precision floating-point number.","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"math-float64-exponent","version":"0.0.0","description":"Returns an integer corresponding to the unbiased exponent of a double-precision floating-point number.","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/float64-exponent.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","exponent","unbiased","bits","floating-point","float64","float","double","dbl","ieee754","number","high","word"],"bugs":{"url":"https://github.com/math-io/float64-exponent/issues"},"dependencies":{"math-float64-get-high-word":"^1.0.0"},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","const-ninf-float64":"^1.0.0","const-pinf-float64":"^1.0.0","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","math-float64-bits":"^1.0.0","math-power":"^1.0.0","math-round":"^1.0.0","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":"68bde43e9d16fd07f76f3480e8826cb5d6e9615e","homepage":"https://github.com/math-io/float64-exponent#readme","_id":"math-float64-exponent@0.0.0","_shasum":"24ced2364ea3637afc3cb988acdab121cf615a46","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"24ced2364ea3637afc3cb988acdab121cf615a46","tarball":"https://registry.npmjs.org/math-float64-exponent/-/math-float64-exponent-0.0.0.tgz","integrity":"sha512-iRY6X2lE0Mw4w2S8stHcf3/y8faP4rIhjHh8P7j4pafQZ53iBquQ70YrvPSmohe2cj5HiZb7e6oOhaM3Bbqi6A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZGZVzOhGnMrFvJuFPX2mTmpBr4ECYPCafxkaAQw1TPAiANG1J1vWNFoAMgIXN8WIOj6h2j3FXPe5Da5vTABGFMqA=="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.0":{"name":"math-float64-exponent","version":"1.0.0","description":"Returns an integer corresponding to the unbiased exponent of a double-precision floating-point number.","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/float64-exponent.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","exponent","unbiased","bits","floating-point","float64","float","double","dbl","ieee754","number","high","word"],"bugs":{"url":"https://github.com/math-io/float64-exponent/issues"},"dependencies":{"math-float64-get-high-word":"^1.0.0"},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","const-ninf-float64":"^1.0.0","const-pinf-float64":"^1.0.0","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","math-float64-bits":"^1.0.0","math-power":"^1.0.0","math-round":"^1.0.0","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":"fd0405c9ff3dd2a90d03cf84540e7e7f3fc40408","homepage":"https://github.com/math-io/float64-exponent#readme","_id":"math-float64-exponent@1.0.0","_shasum":"d8893e835f5e65812add6ce7abafee93daa75ca5","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"d8893e835f5e65812add6ce7abafee93daa75ca5","tarball":"https://registry.npmjs.org/math-float64-exponent/-/math-float64-exponent-1.0.0.tgz","integrity":"sha512-IC+IUir6tLqFeGAxap2842rGpYWl4UBItglxDSPCjJTh1vD6Tbuap+aaL+k1LzMxVm9PrXpKTb9uhTqLJRR35w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJLFF1Qe/JZrkNpsiDxABlmGA7fWYjFjWY+9rQ59E6swIgEsLGgXVRB0JMTmrSpxjEUKoWA1gUVqCsFlWuJtfNKBg="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]}},"readme":"Exponent\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> Returns an integer corresponding to the unbiased exponent of a [double-precision floating-point number][ieee754].\n\n\n## Installation\n\n``` bash\n$ npm install math-float64-exponent\n```\n\n\n## Usage\n\n``` javascript\nvar exponent = require( 'math-float64-exponent' );\n```\n\n#### exponent( x )\n\nReturns an `integer` corresponding to the unbiased exponent of a [double-precision floating-point number][ieee754].\n\n``` javascript\nvar exp = exponent( 3.14e307 );\n// returns 1021 => 2**1021 ~ 1e307\n\nvar exp = exponent( 3.14e-307 );\n// returns -1019 => 2**-1019 ~ 1e-307\n\nexp = exponent( -3.14 );\n// returns 1\n\nexp = exponent( 0 );\n// returns 0\n\nexp = exponent( NaN );\n// returns 1024 => 2**1024 ~ infinity\n```\n\n\n## Examples\n\n``` javascript\nvar round = require( 'math-round' );\nvar pow = require( 'math-power' );\nvar exponent = require( 'math-float64-exponent' );\n\nvar frac;\nvar exp;\nvar x;\nvar e;\nvar i;\n\n// Generate random numbers and extract their exponents...\nfor ( i = 0; i < 100; i++ ) {\n\tfrac = Math.random() * 10;\n\texp = round( Math.random()*646 ) - 323;\n\tx = frac * pow( 10, exp );\n\te = exponent( x );\n\tconsole.log( 'x: %d. unbiased exponent: %d.', x, e );\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-float64-exponent.svg\n[npm-url]: https://npmjs.org/package/math-float64-exponent\n\n[build-image]: http://img.shields.io/travis/math-io/float64-exponent/master.svg\n[build-url]: https://travis-ci.org/math-io/float64-exponent\n\n[coverage-image]: https://img.shields.io/codecov/c/github/math-io/float64-exponent/master.svg\n[coverage-url]: https://codecov.io/github/math-io/float64-exponent?branch=master\n\n[dependencies-image]: http://img.shields.io/david/math-io/float64-exponent.svg\n[dependencies-url]: https://david-dm.org/math-io/float64-exponent\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/math-io/float64-exponent.svg\n[dev-dependencies-url]: https://david-dm.org/dev/math-io/float64-exponent\n\n[github-issues-image]: http://img.shields.io/github/issues/math-io/float64-exponent.svg\n[github-issues-url]: https://github.com/math-io/float64-exponent/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[ieee754]: https://en.wikipedia.org/wiki/IEEE_754-1985\n","maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"time":{"modified":"2022-06-19T16:38:57.995Z","created":"2016-01-20T00:23:03.449Z","0.0.0":"2016-01-20T00:23:03.449Z","1.0.0":"2016-01-20T00:23:25.048Z"},"homepage":"https://github.com/math-io/float64-exponent#readme","keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","exponent","unbiased","bits","floating-point","float64","float","double","dbl","ieee754","number","high","word"],"repository":{"type":"git","url":"git://github.com/math-io/float64-exponent.git"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"bugs":{"url":"https://github.com/math-io/float64-exponent/issues"},"license":"MIT","readmeFilename":"README.md"}