# polyeval
> Evaluate polynomials.
[](https://crates.io/crates/polyeval)
[](https://docs.rs/polyeval)
[](https://github.com/FedericoStra/polyeval)
[](https://github.com/FedericoStra/polyeval/actions/workflows/rust.yml)
[](https://deps.rs/repo/github/FedericoStra/polyeval)
[](https://choosealicense.com/licenses/mit/)
## Contents
This crate provides four macros (`horner!`, `horner_fma!`, `estrin!`, and `estrin_fma!`) to evaluate
a polynomial using either [Horner's method][Horner] or [Estrin's scheme][Estrin].
The `_fma` variants use "fused multiply-add" instructions where applicable.
It provide also two functions (`horner` and `horner_array`) that work with slices and arrays respectively.
[Horner]: https://en.wikipedia.org/wiki/Horner%27s_method
[Estrin]: https://en.wikipedia.org/wiki/Estrin%27s_scheme
## Other crates
On <https://crates.io> there are several crates related to polynomial evaluation:
- [`horner`](https://crates.io/crates/horner): provides two functions to evaluate polynomials of known and unknown order;
- [`horner-eval`](https://crates.io/crates/horner-eval): provides a macro to evaluate polynomials with known coefficients and a function to evaluate polynomials of unknown order;
- [`fast_polynomial`](https://crates.io/crates/fast_polynomial): provides two functions to evaluate polynomials of known and unknown order, implementing a hybrid Estrin's/Horner's method exploiting instruction-level parallelism;
- [`polynomen`](https://crates.io/crates/polynomen): general arithmetic with polynomials (possibly incomplete?);
- [`horny`](https://crates.io/crates/horny) and [`horny_macro`](https://crates.io/crates/horny) are "Reserved for future use (seriously)", but are completely empty and haven't received an update in 3+ years.