newton-method

1.0.1 • Public • Published

Newton-Method

This is a simple package demonstrating the Newton Method for finding roots of a function. Learn more.

const newtonMethod = require('newton-method')

console.log(newtonMethod('x^2', 100, 5))

newtonMethod(func, inputIterations, inputInitial)

func - Required - Function to evaluate - Uses mathjs formatting - See here for more information

inputIterations - Default: 100 - Number of times to iterate Newton's Method - More times yields more accurate results

inputInitial - Default: 0 - Initial value to start applying Newton's Method to

Result

3.944304526105059e-30

Package Sidebar

Install

npm i newton-method

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

2.09 kB

Total Files

3

Last publish

Collaborators

  • zo-bro-23