newton-raphson

0.0.3 • Public • Published

newton-raphson

JavaScript implementation of the Newton-Raphson method for approximating roots of a real-valued function. See Wikipedia for details on the theory.

Usage

var findRoot = require('newton-raphson');

function f(x) {
  return x * x - 2;
}
function fprime(x) {
  return 2 * x;
}
var initialGuess = 1;

findRoot(f, fprime, 1);
// 1.4142135623730951

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    411
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    411
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i newton-raphson

Weekly Downloads

411

Version

0.0.3

License

MIT

Last publish

Collaborators

  • davewasmer