arithmoi-0.12.0.1: Efficient basic number-theoretic functions.
Safe HaskellNone
LanguageHaskell2010

Math.NumberTheory.Diophantine

Synopsis

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