| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Math.NumberTheory.Diophantine
Synopsis
- cornacchiaPrimitive :: Integer -> Integer -> [(Integer, Integer)]
- cornacchia :: Integer -> Integer -> [(Integer, Integer)]
Documentation
cornacchiaPrimitive :: Integer -> Integer -> [(Integer, Integer)] Source #
Finds all primitive solutions (x,y) to the diophantine equation | x^2 + d*y^2 = m | when 1 <= d < m and gcd(d,m)=1 | Given m is square free these are all the positive integer solutions
cornacchia :: Integer -> Integer -> [(Integer, Integer)] Source #
Finds all positive integer solutions (x,y) to the | diophantine equation: | x^2 + d*y^2 = m | when 1 <= d < m and gcd(d,m)=1