euler-0.1.0.0

Safe HaskellSafe
LanguageHaskell2010

Euler.Util.PellEquation

Description

Pell's Equation: x^2 - Dy^2 = 1.

Synopsis

Documentation

fundamentalSolution Source #

Arguments

:: Integral a 
=> a

D

-> Maybe (a, a) 

The fundamental solution to Pell's Equation is the solution (x, y) minimizing x.

checkSolution Source #

Arguments

:: Integral a 
=> a

D

-> (a, a)

(x, y)

-> Bool