7 releases
new 0.2.1 | Mar 30, 2025 |
---|---|
0.2.0 | Mar 30, 2025 |
0.1.4 | Mar 29, 2025 |
#470 in Math
48 downloads per month
14KB
320 lines
Solve Pell's equation
use rug::Integer;
let v = pell_equation::solve_pell(Integer::from(2));
assert_eq!(v, pell_equation::Solution::Negative(Integer::from(1), Integer::from(1)));
let w = pell_equation::solve_pell(Integer::from(3));
assert_eq!(w, pell_equation::Solution::Positive(Integer::from(2), Integer::from(1)));
Dependencies
~21MB
~503K SLoC