FloPoly is a JavaScript/TypeScript utility library focused on efficient and accurate real root-finding for real-coefficient polynomials. Currently at version 7.0.1, it supports Node.js (>=12.20.0) and browser environments, distributed as an ECMAScript Module (ESM). The library excels in root-finding for polynomials up to approximately degree 20, employing Rolle's Theorem. It offers advanced capabilities like 'certified' root-finding, which are robust against high condition numbers, and supports various coefficient precisions including `double`, `double-double`, `Shewchuk expansions`, and `bigint`. Beyond root-finding, FloPoly provides a suite of polynomial operators. Its ESM-only distribution simplifies its use in modern JavaScript projects, though it marks a breaking change for older CommonJS environments. While a precise release cadence is not specified, the version jumps suggest significant, though not frequent, updates.
npm install flo-polyVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic root finding with `allRoots`, highly accurate certified root finding with `allRootsCertifiedSimplified`, and a simple polynomial addition operation.
Ensure your project is configured for ESM (e.g., `"type": "module"` in `package.json`) and use `import` statements. If using bundlers like Webpack with TypeScript, specific configurations like `resolve-typescript-plugin` might be necessary.
For highly accurate and certified results, especially with ill-conditioned polynomials, use `allRootsCertifiedSimplified` or the more flexible `allRootsCertified` which supports `double-double` and `Shewchuk expansion` coefficients.
Consider the degree of polynomials when choosing FloPoly for performance-critical applications, or evaluate alternative libraries if consistently dealing with very high-degree polynomials where `O(n)` methods are critical.
If dealing with extremely large root magnitudes or coefficient values, utilize functions that support arbitrary-precision types like `bigint` or `double-double` where available within the library, or implement scaling pre-processing.
Ensure your project is set up for ESM by adding `"type": "module"` to your `package.json` and using `import { ... } from 'flo-poly';`. If in a browser without a bundler, import from the explicit browser path: `import { ... } from './node_modules/flo-poly/browser/index.min.js';`Verify that `allRoots` is correctly imported as a named export: `import { allRoots } from 'flo-poly';`. FloPoly primarily uses named exports. If the issue persists with a bundler, ensure your bundler configuration correctly handles ESM imports, particularly for TypeScript projects where `resolve-typescript-plugin` might be needed.For browsers, ensure your script tag is `<script type="module">`. For Node.js, ensure your `package.json` includes `"type": "module"` to enable ESM globally, or run with `node --input-type=module` for single files.
No dependency data recorded yet.