Computes the derivative a polynomial. Formally the same thing as multiplying by the index and shifting left.
Compute the derivative of the polynomial
1 + 2*x + 3*x^2 + 4*x^3:
console.logrequire"poly-derivative"1 2 3 4
[ 2, 6, 12 ]
Install using npm:
npm install poly-derivative
Computes the derivative of a polynomial, with coefficients represented in increasing order.
coeffsare the coefficients of the polynomial
Returns The derivative of the polynomial
(c) 2013 Mikola Lysenko. MIT License