New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@skymaker/quartic

Package Overview
Dependencies
Maintainers
7
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skymaker/quartic

JavaScript library for solving quartic equations

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
7
Created
Source

Quartic.js Build Status devDependency Status

JavaScript library for solving quartic equations.

Install

$ npm install @skymaker/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');

//Solve 5x^4 + 4x^3+ 3x^2 + 2x + 1
var roots = quartic.solve(5,4,3,2,1); 

console.log(roots);

Get the code

$ git clone https://github.com/lavelle/quartic
$ cd quartic
$ npm install
$ npm 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.

FAQs

Package last updated on 09 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts