|
NTLib - Number Theory Library 0.9
|
Finds integer solutions to Pell's equation. More...
Functions | |
| template<Integer T> | |
| constexpr std::tuple< T, T > | ntlib::pell_fundamental_solution (T D) noexcept |
| Compute the fundamental solution. | |
| template<Integer T> | |
| constexpr std::tuple< T, T > | ntlib::pell_next_solution (T D, const std::tuple< T, T > &initial, const std::tuple< T, T > ¤t) noexcept |
| Generates the next larger solution to Pell's equation. | |
Finds integer solutions to Pell's equation.
Given a non-square integer \(D \in \mathbb{N}\), finds integers \(x, y \in \mathbb{Z}\) satisfying \(x^2 - D \cdot y^2 = 1\).
Files | |
| file | modules/diophantine/pell_equation.cpp |
| Primary module interface unit for module pell_equation. | |