🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

poly-mult

Package Overview
Dependencies
Maintainers
6
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poly-mult

Multiplies polynomials by brute force

1.0.0
latest
Source
npm
Version published
Weekly downloads
2
-33.33%
Maintainers
6
Weekly downloads
 
Created
Source

poly-mult

Brute force polynomial multiplication.

build status

Example

Real polynomials

Compute (1 + 2*x) * (1 + x^2):

var mult = require("poly-mult")
console.log(mult([1, 2], [1, 0, 1]))

Output

[1, 2, 1, 2]

Complex polynomials

Compute (i + (1+3i)*x) * (2 + 5i * x^2)

var mult = require("poly-mult")
console.log(mult( [[0, 1], [1, 3]],
                  [[2, 0, 0], [0, 0, 5]] ))

Output

[[0, 2, 5, 15],
 [2, 6, 0, 5]]

Install

Install using npm:

npm install poly-mult

API

require("poly-mult")(a, b)

Multiplies a pair of polynomials together. This works basically the same as poly-mult-fft, except it is slower but more accurate.

License

(c) 2013 Mikola Lysenko. MIT License

Keywords

scijs

FAQs

Package last updated on 02 Jul 2015

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