Skip to content

runt18/quartic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quartic.js Build Status devDependency Status

JavaScript library for solving quartic equations.

Install

$ npm install quartic

Usage

Pass an array of the 5 coefficients of equation to solve, from the x^4 term down to the constant term.

The results are returned as Math.js complex number objects, with re and im properties that hold the real and imaginary part of the complex root respectively.

var quartic = require('quartic');

var coefficients = [5, 4, 3, 2, 1];
var roots = quartic(coefficients);

console.log(roots);

Get the code

$ git clone https://github.com/lavelle/quartic
$ cd quartic
$ npm install
$ make test

Credits

Core code is from a web solver written by David Binner

License

Released with permission from the original author under the MIT license.

About

JavaScript library for solving quartic equations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published