
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
poly-mult-fft
Advanced tools
Multiplies two polynomials together using an FFT.
First install
npm install poly-mult-fft
Then use as follows:
var mult = require("poly-mult-fft")
//Compute:
//
// (1 + 2*x) * (1 + x^2)
//
console.log(mult([1, 2], [1, 0, 1]))
//Prints:
//
// [1, 2, 1, 2]
//
//Also supports complex numbers. For example, compute:
//
// (i + (1+3i)*x) * (2 + 5i * x^2)
//
console.log(mult( [[0, 1], [1, 3]],
[[2, 0, 0], [0, 0, 5]] ))
//Prints:
//
// [[0, 2, 5, 15],
// [2, 6, 0, 5]]
//
require("poly-mult-fft")(a, b)Multiplies two polynomials together.
a is the first polynomialb is the second polynomialSupports both real and complex valued polynomials. To handle complex data, you should pass in a pair of coefficients
Returns: The product of the two polynomials
Time Complexity: O((a.length + b.length) * log(a.length + b.length))
(c) 2013 Mikola Lysenko. MIT License
FAQs
Multiplies polynomials together using an FFT
The npm package poly-mult-fft receives a total of 8 weekly downloads. As such, poly-mult-fft popularity was classified as not popular.
We found that poly-mult-fft demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

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.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.