{"_id":"math-float64-copysign","_rev":"4-a72732e0a31149de283003e30d9af49f","name":"math-float64-copysign","description":"Returns a double-precision floating-point number with the magnitude of x and the sign of y.","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"math-float64-copysign","version":"0.0.0","description":"Returns a double-precision floating-point number with the magnitude of x and the sign of y.","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-copysign.git"},"keywords":["math-io","math.io","math","mathematics","float64","double","copysign","copy","sign","bits","compute-io","compute.io","computation","compute","number","dbl"],"bugs":{"url":"https://github.com/math-io/float64-copysign/issues"},"dependencies":{"math-float64-from-words":"^1.0.0","math-float64-get-high-word":"^1.0.0","math-float64-to-words":"^1.0.0"},"devDependencies":{"browserify":"13.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","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":"9fa24ad1c73ab8aa9216bcff1032633d03da5701","homepage":"https://github.com/math-io/float64-copysign#readme","_id":"math-float64-copysign@0.0.0","_shasum":"c309a37bce1e37226c23a5bf4ec74778969f773d","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"c309a37bce1e37226c23a5bf4ec74778969f773d","tarball":"https://registry.npmjs.org/math-float64-copysign/-/math-float64-copysign-0.0.0.tgz","integrity":"sha512-qMQe2fsSQMOMobeo+4NITfs6tQ1mZPzZptSHbD/vKh9nHiUil5vbebDiQZCH6PrUzd/pRDi1Lxj+I/RN19yHhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYGV1jQwFI8qaFKVg0Yw4ntqfr5g4VPcB7n5kl6522YwIhAKGOYevcAQDXckXXVetpXalw91gQZwixCIRaiDSxUgb+"}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/math-float64-copysign-0.0.0.tgz_1455862090848_0.5762896097730845"}},"1.0.0":{"name":"math-float64-copysign","version":"1.0.0","description":"Returns a double-precision floating-point number with the magnitude of x and the sign of y.","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-copysign.git"},"keywords":["math-io","math.io","math","mathematics","float64","double","copysign","copy","sign","bits","compute-io","compute.io","computation","compute","number","dbl"],"bugs":{"url":"https://github.com/math-io/float64-copysign/issues"},"dependencies":{"math-float64-from-words":"^1.0.0","math-float64-get-high-word":"^1.0.0","math-float64-to-words":"^1.0.0"},"devDependencies":{"browserify":"13.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","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":"809bcbbe9923c7e236339f0147f669ec8c786756","homepage":"https://github.com/math-io/float64-copysign#readme","_id":"math-float64-copysign@1.0.0","_shasum":"8aec85d28d81c7a23cab0748a23c5f01916966f6","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"8aec85d28d81c7a23cab0748a23c5f01916966f6","tarball":"https://registry.npmjs.org/math-float64-copysign/-/math-float64-copysign-1.0.0.tgz","integrity":"sha512-PYLC+jVqsHy0+Ky8pGzKytSVzZ5slW/FfoqMy0sJj7bHn//OhWes/RqywgGNJGLtjhVJM1YuZg/qJ+bus9lLnQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEPPeO0eoau5oAKRZRtkOeHd5Za+wQ2wYEcaPAUGTuepAiEAu8DCwgKdfl2/EMw1UFSrqygTS8q9lKtqN1LNXEc1YVc="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/math-float64-copysign-1.0.0.tgz_1455862111123_0.6942090610973537"}}},"readme":"Copysign\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 a [double-precision floating-point number][ieee754] with the magnitude of `x` and the sign of `y`.\n\n\n## Installation\n\n``` bash\n$ npm install math-float64-copysign\n```\n\n\n## Usage\n\n``` javascript\nvar copysign = require( 'math-float64-copysign' );\n```\n\n#### copysign( x, y )\n\nReturns a [double-precision floating-point number][ieee754] with the magnitude of `x` and the sign of `y`.\n\n``` javascript\nvar z = copysign( -3.14, 10 );\n// returns 3.14\n\nz = copysign( 3.14, -1 );\n// returns -3.14\n\nz = copysign( 1, -0 );\n// returns -1\n\nz = copysign( -3.14, -0 );\n// returns -3.14\n\nz = copysign( -0, 1 );\n// returns 0\n```\n\n\n## Notes\n\n*\tAccording to the [IEEE754][ieee754] standard, a `NaN` has a biased exponent equal to `2047`, a significand greater than `0`, and a sign bit equal to __either__ `1` __or__ `0`. In which case, `NaN` may not correspond to just one but many binary representations. Accordingly, care should be taken to ensure that `y` is __not__ `NaN`, else behavior may be indeterminate.\n\n\n## Examples\n\n``` javascript\nvar copysign = require( 'math-float64-copysign' );\n\nvar x;\nvar y;\nvar z;\nvar i;\n\n// Generate random double-precision floating-point numbers `x` and `y` and copy the sign of `y` to `x`...\nfor ( i = 0; i < 100; i++ ) {\n\tx = Math.random()*100 - 50;\n\ty = Math.random()*10 - 5;\n\tz = copysign( x, y );\n\tconsole.log( 'x: %d, y: %d => %d', x, y, z );\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-copysign.svg\n[npm-url]: https://npmjs.org/package/math-float64-copysign\n\n[build-image]: http://img.shields.io/travis/math-io/float64-copysign/master.svg\n[build-url]: https://travis-ci.org/math-io/float64-copysign\n\n[coverage-image]: https://img.shields.io/codecov/c/github/math-io/float64-copysign/master.svg\n[coverage-url]: https://codecov.io/github/math-io/float64-copysign?branch=master\n\n[dependencies-image]: http://img.shields.io/david/math-io/float64-copysign.svg\n[dependencies-url]: https://david-dm.org/math-io/float64-copysign\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/math-io/float64-copysign.svg\n[dev-dependencies-url]: https://david-dm.org/dev/math-io/float64-copysign\n\n[github-issues-image]: http://img.shields.io/github/issues/math-io/float64-copysign.svg\n[github-issues-url]: https://github.com/math-io/float64-copysign/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","maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"time":{"modified":"2022-06-19T16:38:54.990Z","created":"2016-02-19T06:08:14.936Z","0.0.0":"2016-02-19T06:08:14.936Z","1.0.0":"2016-02-19T06:08:33.881Z"},"homepage":"https://github.com/math-io/float64-copysign#readme","keywords":["math-io","math.io","math","mathematics","float64","double","copysign","copy","sign","bits","compute-io","compute.io","computation","compute","number","dbl"],"repository":{"type":"git","url":"git://github.com/math-io/float64-copysign.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-copysign/issues"},"license":"MIT","readmeFilename":"README.md"}