This is a `playground`

to test code. It runs a full `Node.js`

environment and already has all of `npm`

’s 1,000,000+ packages pre-installed, including `poly-derivative`

with all `npm`

packages installed. **Try it out**:

var polyDerivative = require("poly-derivative")

- all documents on RunKit are public
`require()`

any package directly from npm- use arrow functions, classes, template strings, and most of ES6
`await`

any promise instead of using callbacks (example)- create your own embedded
**node.js**snippets

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

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.log(require("poly-derivative")([1, 2, 3, 4]))
```

```
[ 2, 6, 12 ]
```

Install using npm:

```
npm install poly-derivative
```

`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

(c) 2013 Mikola Lysenko. MIT License

- package on npmhttps://npmjs.com/package/poly-derivative
- licenseMIT

RunKit is a free, in-browser JavaScript dev environment for prototyping **Node.js** code, with every **npm** package installed. Sign up to share your code.

Sign Up for Free