Package Exports
- nodequadratic
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nodequadratic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Node Quadratic
In algebra, a quadratic function, a quadratic polynomial, a polynomial of degree 2, or simply a quadratic, is a polynomial function in one or more variables in which the highest-degree term is of the second degree.
Installation
This is a Node.js module available through the npm registry.
Before installing nodequadratic, download and install Node.js
Installation is accomplished using the npm install command:
$ npm i nodequadratic
Usage
Node Quadratic is a very simple package to use:
var nodequadratic = require("nodequadratic")
var result = nodequadratic.solve(1, -12, -28);
console.log(result);
/* {
discriminant: 256,
solutions: {
plus: 14,
minus: -2
}
} */
The plus and minus solutions come from subtracting or adding the discriminant from -b before dividing by 2a.
console.log(result.solutions.plus);
// 14