https://github.com/leomotors/polynomial-generator
npm package for generating Polynomial
https://github.com/leomotors/polynomial-generator
math npm-package polynomial
Last synced: 20 days ago
JSON representation
npm package for generating Polynomial
- Host: GitHub
- URL: https://github.com/leomotors/polynomial-generator
- Owner: leomotors
- License: mit
- Created: 2021-12-01T06:52:40.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-07T08:46:36.000Z (almost 4 years ago)
- Last Synced: 2025-02-04T02:18:40.445Z (over 1 year ago)
- Topics: math, npm-package, polynomial
- Language: TypeScript
- Homepage: https://leomotors.github.io/polynomial-generator/
- Size: 286 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Polynomial Generator
[](https://www.npmjs.com/package/polynomial-generator)
[](https://www.npmjs.com/package/polynomial-generator)
[](https://github.com/Leomotors/polynomial-generator/actions)
Library to generate random polynomial
Can be use to generate problems to solve
## 📃 Example
```js
import { generate, generateMany } from "polynomial-generator";
const option = {
numeratorRange: 10,
denominatorRange: 2,
degree: 2,
};
// generate single
const [polynomial, roots] = generate(option);
console.log(polynomial.toString()); // 2x²+15x-8
console.log(polynomial.toString("html")); // 2x2+15x-8
console.log(polynomial.toString("latex")); // 2x^{2}+15x-8
// generate many
const polynomials = generateMany(option, 100);
```
## 📚 Documents
[TypeDoc](https://leomotors.github.io/polynomial-generator/)