A JavaScript library for creating, manipulating, and performing arithmetic on polynomials over various mathematical fields.
Polynomial.js is a JavaScript library for creating and manipulating polynomials. It enables developers to perform arithmetic operations, calculus (derivatives and integrals), and evaluations on polynomials over various mathematical fields like real numbers, rational numbers, complex numbers, and finite fields. It solves the problem of handling polynomial mathematics in JavaScript applications without relying on external math software.
JavaScript developers, educators, and researchers who need to perform polynomial calculations in web applications, educational tools, or scientific computing projects.
Developers choose Polynomial.js for its comprehensive feature set, support for multiple mathematical fields, and lightweight design optimized for compression and performance in both browser and Node.js environments.
The RAW JavaScript library to work with polynomials
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports real, rational, complex, quaternions, and finite fields, seamlessly integrating with Fraction.js and Complex.js for extended mathematical operations.
Allows polynomial creation from strings, arrays, objects, or numbers, with examples showing support for complex and rational coefficients via direct parsing.
Includes arithmetic, calculus (derive and integrate), GCD, fromRoots, and multiple representations like LaTeX and Horner scheme, as detailed in the functions list.
Designed with a coding style that minimizes size after compression with Google Closure Compiler, ensuring a lightweight footprint as per the philosophy.
Requires Fraction.js and Complex.js for rational and complex number support, adding setup complexity and increasing bundle size, as noted in the installation section.
The string parser does not handle white-spaces or brackets recursively, which can cause errors if input is not meticulously formatted, as warned in the README.
Uses a global setField() method for configuring fields, which may lead to side effects in applications with multiple polynomial contexts or concurrent operations.