#algebra #polynomial

polynomial-ring

polynomial on field

11 releases

new 0.3.5 Jul 29, 2021
0.3.4 Jul 25, 2021
0.2.1 Mar 28, 2021
0.1.2 Mar 21, 2021
0.1.1 Apr 5, 2020

#72 in Math

Download history 23/week @ 2021-04-08 34/week @ 2021-04-15 16/week @ 2021-04-22 27/week @ 2021-04-29 15/week @ 2021-05-06 20/week @ 2021-05-13 16/week @ 2021-05-20 17/week @ 2021-05-27 16/week @ 2021-06-03 23/week @ 2021-06-10 15/week @ 2021-06-17 16/week @ 2021-06-24 68/week @ 2021-07-01 30/week @ 2021-07-08 53/week @ 2021-07-15 48/week @ 2021-07-22

118 downloads per month
Used in 2 crates

MIT/Apache

32KB
846 lines

Polynomial Ring

Polynomial ring on Field (or Ring).

use num::Rational64;
use polynomial_ring::Polynomial;
let f = Polynomial::new(vec![3, 1, 4, 1, 5].into_iter().map(|x| Rational64::from_integer(x)).collect());
let g = Polynomial::new(vec![2, 7, 1].into_iter().map(|x| Rational64::from_integer(x)).collect());
let mut r = f.clone();
let q = r.division(&g);
assert_eq!(f, q * g + r);

Add, Sub, Mul, Div, and Rem of polynomial is implemented. Derivative, square free, pseudo division, and resultant is implemented.

Licence

MIT OR Apache-2.0

Dependencies

~485KB
~11K SLoC