{"_id":"durand-kerner","_rev":"16-bd974d28ca9ec79cd7698c5a6a88c9e4","name":"durand-kerner","description":"Finds multiple roots of polynomials using Weierstrass' method","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"durand-kerner","version":"0.0.0","description":"Finds multiple roots of polynomials using Weierstrass' method","main":"roots.js","directories":{"test":"test"},"dependencies":{"bit-twiddle":"~0.0.2"},"devDependencies":{"tap":"~0.4.2"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/durand-kerner.git"},"keywords":["root","polynomial","weierstrass","durand","kerner","multiple","zero","solve","algebra","math","newton","equation"],"author":{"name":"Mikola Lysenko"},"license":"MIT","gitHead":"d3acb633d8b285c040b041d604c45b44a43d035a","_id":"durand-kerner@0.0.0","dist":{"shasum":"87585fab74b05c653fcfb9c6b3c2635f709668c3","tarball":"https://registry.npmjs.org/durand-kerner/-/durand-kerner-0.0.0.tgz","integrity":"sha512-TcV47fs4iPxOLogT4t+6GmeirTd8okXdFsgyVct8f1+d4J9kkhK7kOqcG2L/Z6kXQ1FQ2OsQn1pkvC6zTFJ1kg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2DyAyQse/V/UNmEwh90BEYpD801GtCDqOTFep0kA1gwIhALe1UNn4FUEg+rAl+2OtgJ8AUE8OfEBAJTqO4UjrX6kX"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]},"0.0.1":{"name":"durand-kerner","version":"0.0.1","description":"Finds multiple roots of polynomials using Weierstrass' method","main":"roots.js","directories":{"test":"test"},"dependencies":{"bit-twiddle":"~0.0.2"},"devDependencies":{"tap":"~0.4.2"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/durand-kerner.git"},"keywords":["root","polynomial","weierstrass","durand","kerner","multiple","zero","solve","algebra","math","newton","equation"],"author":{"name":"Mikola Lysenko"},"license":"MIT","gitHead":"d3acb633d8b285c040b041d604c45b44a43d035a","_id":"durand-kerner@0.0.1","dist":{"shasum":"b6171f9ca50ddae5c44192240a8a222a87e5ec9b","tarball":"https://registry.npmjs.org/durand-kerner/-/durand-kerner-0.0.1.tgz","integrity":"sha512-QiQZZiEo4YCFb1NyiawEhSWcQYwYxvqxdSz3tuRjc0WYN+cvbylbarEhHmpuH9fipn0OhmHD6bBHDsuvCWUSkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICFSGbg550hMqzF4K6jYIVMhcPJj4E3AGVMpaKW0wB8+AiEA5BuhyRDbMeQqC9xTCnTwY0/XvRVtU+IFUAPHv763xQw="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]},"0.0.2":{"name":"durand-kerner","version":"0.0.2","description":"Finds multiple roots of polynomials using Weierstrass' method","main":"roots.js","directories":{"test":"test"},"dependencies":{"bit-twiddle":"~0.0.2"},"devDependencies":{"tap":"~0.4.2","almost-equal":"0.0.0","poly-mult":"0.0.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/durand-kerner.git"},"keywords":["root","polynomial","weierstrass","durand","kerner","multiple","zero","solve","algebra","math","newton","equation"],"author":{"name":"Mikola Lysenko"},"license":"MIT","gitHead":"d3acb633d8b285c040b041d604c45b44a43d035a","_id":"durand-kerner@0.0.2","dist":{"shasum":"6c2dafdcc94f57d1e4b1bd5d33286f048edef1c8","tarball":"https://registry.npmjs.org/durand-kerner/-/durand-kerner-0.0.2.tgz","integrity":"sha512-YRZisGn4ih5dMXfVAMIK8QQKTI+K0oLQlD1CzrZGMH+8/WFmEBTnLakeSRpOD6HwQKkP7exWyJfoLne5+gPI4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA0W3arkTKTAvBGuNWQvdz1e8DD3TcI2Bp+gkQ8S4ZueAiEAh9Z7eacNuYUbuWy/5HFK4m3PylCMvAR7hXVcd0PJhSc="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]},"1.0.0":{"name":"durand-kerner","version":"1.0.0","description":"Finds multiple roots of polynomials using Weierstrass' method","main":"roots.js","directories":{"test":"test"},"dependencies":{"next-pow-2":"^1.0.0"},"devDependencies":{"tape":"^4.0.0","almost-equal":"^1.0.0","poly-mult":"0.0.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/scijs/durand-kerner.git"},"keywords":["scijs","root","polynomial","weierstrass","durand","kerner","multiple","zero","solve","algebra","math","newton","equation"],"author":{"name":"Mikola Lysenko"},"license":"MIT","gitHead":"d3acb633d8b285c040b041d604c45b44a43d035a","bugs":{"url":"https://github.com/scijs/durand-kerner/issues"},"homepage":"https://github.com/scijs/durand-kerner","_id":"durand-kerner@1.0.0","_shasum":"100d09954b81e9581676a6cef2c8918bfc974351","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"jaspervdg","email":"th.v.d.gronde@hccnet.nl"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"jaspervdg","email":"th.v.d.gronde@hccnet.nl"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"substack","email":"substack@gmail.com"}],"dist":{"shasum":"100d09954b81e9581676a6cef2c8918bfc974351","tarball":"https://registry.npmjs.org/durand-kerner/-/durand-kerner-1.0.0.tgz","integrity":"sha512-v1ysLXimX2gqOuVCYn5mkEQO3ZNBxXLHEXTRntE7UNTXgU068ZrN/Gh2ez7Di6IH9Jap7kso2PwMpzeEOGqI4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDFQx2L/9Q/zpH/DWedd2OS8KERtZ53uvbcrg8WcnYV+AiBLcqL7FpjhjC3UE7SMSPFOosF+21vV2c0R6rm5wNxQUw=="}]}}},"readme":"durand-kerner\n=============\nFinds all the roots of a polynomial by [Weierstrass' method](http://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method) (or known in Abramowitz&Stegun as the Durand-Kerner method).  This is basically a generalization of Newton's method that works for multiple roots.\n\n[![build status](https://secure.travis-ci.org/scijs/durand-kerner.png)](http://travis-ci.org/scijs/durand-kerner)\n\n# Example\n\nTo find the roots for `1 + 1*x - 1*x^2`:\n  \n```javascript\nvar findRoots = require(\"durand-kerner\")\n\nvar roots = findRoots([1, 1, -1])\n\n// Now:\n//      roots[0] = real part of roots\n//      roots[1] = imaginary part of roots\n\nfor(var i=0; i<roots.length; ++i) {\n  console.log(roots[0][i] + \"+\" + roots[1][i] + \"i\")\n}\n```\n\n### Output\n```\n 1.618033988749895+0i\n-0.6180339887498949+0i\n```\n\n# Install\nInstall using npm:\n\n    npm install durand-kerner\n\n# API\n\n#### `require(\"durand-kerner\")(r_coeff[, i_coeff, n_iters, tolerance, initial])`\nFinds the roots of a polynomial whose real coefficients are given by `r_coeff` and imaginary coefficients by `i_coeff`.\n\n* `r_coeff` - the real part of the polynomial's coefficients, stored in an array\n* `i_coeff` - the imaginary part of the polynomial's coefficients (default all 0)\n* `n_iters` - Maximum number of iterations to run before bailout. Default is `100 * n * n`\n* `tolerance` - Stopping threshold.  Default is `1e-6`\n* `initial` - Initial guess for solution vector (must have the same length as `r_coeff`).  This also gets the solution (optional)\n\n**Returns** An array of roots.  \n\n# License\n(c) 2013 Mikola Lysenko. MIT License","maintainers":[{"email":"mikolalysenko@gmail.com","name":"mikolalysenko"},{"email":"th.v.d.gronde@hccnet.nl","name":"jaspervdg"},{"email":"hughskennedy@gmail.com","name":"hughsk"},{"email":"pgb@andrew.cmu.edu","name":"planeshifter"},{"email":"rsreusser@gmail.com","name":"rreusser"}],"time":{"modified":"2022-11-11T06:34:35.345Z","created":"2013-05-07T17:00:37.835Z","0.0.0":"2013-05-07T17:00:46.136Z","0.0.1":"2013-05-07T19:39:12.308Z","0.0.2":"2013-05-08T17:03:41.330Z","1.0.0":"2015-07-02T14:05:39.765Z"},"author":{"name":"Mikola Lysenko"},"repository":{"type":"git","url":"git://github.com/scijs/durand-kerner.git"},"keywords":["scijs","root","polynomial","weierstrass","durand","kerner","multiple","zero","solve","algebra","math","newton","equation"],"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/scijs/durand-kerner","bugs":{"url":"https://github.com/scijs/durand-kerner/issues"}}