{"_id":"math-float64-to-words","_rev":"4-a6236c7ca8948d75ee4fe1b586b2f160","name":"math-float64-to-words","description":"Splits a floating-point number into a higher order word and a lower order word.","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"math-float64-to-words","version":"0.0.0","description":"Splits a floating-point number into a higher order word and a lower order word.","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 -p ./node_modules/proxyquire-universal ./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-to-words.git"},"keywords":["math.io","math-io","mathematics","math","compute.io","compute-io","computation","compute","float64","floating-point","float","double","dbl","words","split","high","low","sign","signbit","significand","mantissa","exponent","fraction"],"bugs":{"url":"https://github.com/math-io/float64-to-words/issues"},"dependencies":{"utils-is-little-endian":"^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-floor":"^1.0.1","math-power":"^1.0.0","proxyquire":"^1.7.3","proxyquire-universal":"^1.0.8","proxyquireify":"^3.0.1","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x","utils-left-pad-string":"^1.0.1","utils-repeat-string":"^1.0.3"},"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":"b79150865b6c7a0a1d5546d7a2eb7b63790cb04a","homepage":"https://github.com/math-io/float64-to-words#readme","_id":"math-float64-to-words@0.0.0","_shasum":"1b68a602468be5904ef468e7027e499eea660030","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"1b68a602468be5904ef468e7027e499eea660030","tarball":"https://registry.npmjs.org/math-float64-to-words/-/math-float64-to-words-0.0.0.tgz","integrity":"sha512-Dj+c/gb6PmLPHSjc4tvsSR3GnX9Or2I62njYNgYg2Y54EjZrGcLpqp6hH9HuVPQ+r52Pp1BoTGlwt2d6EN5UcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEjtdP0CdfgjDW8fBgT4gIfkHA7WIfbwZWE3KmxDtrcwAiBgh4x64rO0xuYfNsR1fv9cP1tDYOi3Bx2wTmSLqX1ZcQ=="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.0":{"name":"math-float64-to-words","version":"1.0.0","description":"Splits a floating-point number into a higher order word and a lower order word.","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 -p ./node_modules/proxyquire-universal ./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-to-words.git"},"keywords":["math.io","math-io","mathematics","math","compute.io","compute-io","computation","compute","float64","floating-point","float","double","dbl","words","split","high","low","sign","signbit","significand","mantissa","exponent","fraction"],"bugs":{"url":"https://github.com/math-io/float64-to-words/issues"},"dependencies":{"utils-is-little-endian":"^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-floor":"^1.0.1","math-power":"^1.0.0","proxyquire":"^1.7.3","proxyquire-universal":"^1.0.8","proxyquireify":"^3.0.1","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x","utils-left-pad-string":"^1.0.1","utils-repeat-string":"^1.0.3"},"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":"22922f03cb1b78cfb6c490371921b62606edb170","homepage":"https://github.com/math-io/float64-to-words#readme","_id":"math-float64-to-words@1.0.0","_shasum":"624ebd00c7ff87b2bbcba6e230f904e8a83e061e","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"624ebd00c7ff87b2bbcba6e230f904e8a83e061e","tarball":"https://registry.npmjs.org/math-float64-to-words/-/math-float64-to-words-1.0.0.tgz","integrity":"sha512-r1MoSE7Px9KXzv0IWOlbtYT5QUAqMWfk8ni5T09G4cG9cAM39teBBEQLdO0s6/dmz5Mrqn84n2Zeju12ue5k7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpw4lFu8iBkbydww98HknJmzuPcOlfytxvMsfx+VM3BAIgBn+D7leoM9a5z+Iohcvk53co0kpTClJQcaI1z+SoWRk="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]}},"readme":"Words\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> Splits a [double-precision floating-point number][ieee754] into a higher order word and a lower order word.\n\n\n## Installation\n\n``` bash\n$ npm install math-float64-to-words\n```\n\n\n## Usage\n\n``` javascript\nvar words = require( 'math-float64-to-words' );\n```\n\n#### words( x )\n\nSplits a [double-precision floating-point number][ieee754] into a higher order word (32-bit `integer`) and a lower order word (32-bit `integer`).\n\n``` javascript\nvar w = words( 3.14e201 );\n// returns [ 1774486211, 2479577218 ]\n```\n\nThe returned `array` contains two elements: a higher order word and a lower order word. The lower order word contains the less significant bits, while the higher order word contains the more significant bits and includes the exponent and sign.\n\n``` javascript\nvar high = w[ 0 ];\n// returns 1774486211\n\nvar low = w[ 1 ];\n// returns 2479577218\n```\n\n\n## Examples\n\n``` javascript\nvar floor = require( 'math-floor' );\nvar pow = require( 'math-power' );\nvar words = require( 'math-float64-to-words' );\n\nvar frac;\nvar exp;\nvar w;\nvar x;\nvar i;\n\n// Generate random numbers and split into words...\nfor ( i = 0; i < 100; i++ ) {\n\tfrac = Math.random() * 10;\n\texp = -floor( Math.random()*324 );\n\tx = frac * pow( 10, exp );\n\tw = words( x );\n\tconsole.log( 'x: %d. higher: %d. lower: %d.', x, w[ 0 ], w[ 1 ] );\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-to-words.svg\n[npm-url]: https://npmjs.org/package/math-float64-to-words\n\n[build-image]: http://img.shields.io/travis/math-io/float64-to-words/master.svg\n[build-url]: https://travis-ci.org/math-io/float64-to-words\n\n[coverage-image]: https://img.shields.io/codecov/c/github/math-io/float64-to-words/master.svg\n[coverage-url]: https://codecov.io/github/math-io/float64-to-words?branch=master\n\n[dependencies-image]: http://img.shields.io/david/math-io/float64-to-words.svg\n[dependencies-url]: https://david-dm.org/math-io/float64-to-words\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/math-io/float64-to-words.svg\n[dev-dependencies-url]: https://david-dm.org/dev/math-io/float64-to-words\n\n[github-issues-image]: http://img.shields.io/github/issues/math-io/float64-to-words.svg\n[github-issues-url]: https://github.com/math-io/float64-to-words/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:39:12.991Z","created":"2016-01-16T23:59:40.322Z","0.0.0":"2016-01-16T23:59:40.322Z","1.0.0":"2016-01-17T00:00:02.515Z"},"homepage":"https://github.com/math-io/float64-to-words#readme","keywords":["math.io","math-io","mathematics","math","compute.io","compute-io","computation","compute","float64","floating-point","float","double","dbl","words","split","high","low","sign","signbit","significand","mantissa","exponent","fraction"],"repository":{"type":"git","url":"git://github.com/math-io/float64-to-words.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-to-words/issues"},"license":"MIT","readmeFilename":"README.md"}