-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Package to solve the Generalized Pell Equation.
--
-- Finds all solutions of the generalized Pell Equation.
@package pell
@version 0.1.2.0
-- | This module provides a function to find all square roots of a number
-- modulo another number.
module Math.NumberTheory.Moduli.SquareRoots
-- | sqrts a m finds all square roots of a modulo
-- m, where a is an arbitrary integer and m is
-- a positive integer.
sqrts :: Integer -> Integer -> [Integer]
-- | This module provides a function to solve generalized Pell Equations,
-- using the "LMM Algorithm" described by John P. Robertson in
-- http://www.jpr2718.org/pell.pdf. A generalized Pell
-- Equation is a diophantine equation of the form x^2 - dy^2 =
-- n, where d is a positive integer which is not a square
-- and where n is a non-zero integer. We are looking for
-- solutions (x,y), where x and y are
-- non-negative integers.
module Math.NumberTheory.Pell
-- | Represents a solution to a generalized Pell Equation. The first
-- component is the value of x, the second component that of y.
type Solution = (Integer, Integer)
-- | solve d n calculates all non-negative integer solutions of
-- the generalized Pell Equation x^2 - dy^2 = n, where
-- d must be a positive integer which is not a square, and
-- n must be a non-zero integer.
solve :: Integer -> Integer -> [Solution]