npm

polynomial-generator
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Polynomial Generator

Library to generate random polynomial

Can be use to generate problems to solve

📃 Example

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"));  // 2x<sup>2</sup>+15x-8
console.log(polynomial.toString("latex")); // 2x^{2}+15x-8

// generate many
const polynomials = generateMany(option, 100);

📚 Documents

TypeDoc

/polynomial-generator/

    Package Sidebar

    Install

    npm i polynomial-generator

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    17.3 kB

    Total Files

    34

    Last publish

    Collaborators

    • leomotors