- A simple implementation of a polynomial.
- Rust port of my first ever coding project. (Was written in C++. Boy what a mess that was!)
- For arbitrary polynomials.
- "no zero-coeff terms in memory" invariant.
- latex compatible print.
-
+
,-
,*
,/
,%
operators. - value at.
- derivative, integral.
- finding all real roots.
- plotting multiple polynomials in a finite range.
- better root finding (using descartes rule, variable dx ...).
- The code is written in stable
rust
. gnuplot
is used for plotting.
- The documentation for the code is itself.
- There is minimal documentation for some items, use
cargo doc --open
to view it.
- The polynomial implementation is provided as a library.
- The usage is illustrated in examples under
examples/
directory. - To run an example use
cargo run --example <example-name-without-rs-extension>
. - Get it in your crate using
Cargo.toml
dependency entrypolynomial = { git = "https://github.com/buggedbit/polynomial" }
.
Arithmetic operations on polynomials are illustrated below.
- Addition
- Subtraction
- Multiplication
- Division
- Remainder
Plotting arbitrary number of polynomials in a window.