polyeval

Crates.iopolyeval
lib.rspolyeval
version0.4.3
sourcesrc
created_at2024-01-26 15:39:06.477377
updated_at2024-02-04 18:06:59.76774
descriptionEvaluate polynomials.
homepage
repositoryhttps://github.com/FedericoStra/polyeval
max_upload_size
id1115640
size28,140
Federico Stra (FedericoStra)

documentation

README

polyeval

Evaluate polynomials.

crates.io docs.rs GitHub GitHub Workflow Status Dependencies status MIT license

Contents

This crate provides four macros (horner!, horner_fma!, estrin!, and estrin_fma!) to evaluate a polynomial using either Horner's method or Estrin's scheme. 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.

The crate can be no-std; the features std (enabled by default) and libm are passed through to num-traits.

Other crates

On https://crates.io there are several crates related to polynomial evaluation:

  • horner: provides two functions to evaluate polynomials of known and unknown order;
  • horner-eval: provides a macro to evaluate polynomials with known coefficients and a function to evaluate polynomials of unknown order;
  • 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: general arithmetic with polynomials (possibly incomplete?);
  • horny and horny_macro are "Reserved for future use (seriously)", but are completely empty and haven't received an update in 3+ years.
Commit count: 0

cargo fmt