Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

poly-derivative

1.0.0 • Public • Published

poly-derivative

Computes the derivative a polynomial. Formally the same thing as multiplying by the index and shifting left.

build status

Example

Compute the derivative of the polynomial 1 + 2*x + 3*x^2 + 4*x^3:

console.log(require("poly-derivative")([1, 2, 3, 4]))

Output

[ 2, 6, 12 ]

Install

Install using npm:

npm install poly-derivative

API

require("poly-derivative")(coeffs)

Computes the derivative of a polynomial, with coefficients represented in increasing order.

  • coeffs are the coefficients of the polynomial

Returns The derivative of the polynomial

License

(c) 2013 Mikola Lysenko. MIT License

install

npm i poly-derivative

Downloadsweekly downloads

7

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar