Permalink
Browse files

First version of delat expansion.

  • Loading branch information...
1 parent 0e250f1 commit 6a1dcb144bb4a64ad626f56a54b7498edc1d4930 @yav committed Jan 11, 2009
Showing with 180 additions and 122 deletions.
  1. +0 −14 src/Euclid.hs
  2. +180 −108 src/Presburger.hs
View
@@ -1,14 +0,0 @@
-module Euclid where
-
--- | let (p,q,r) = extended_gcd x y
--- in (x * p + y * q = r) && (gcd x y = r)
-extended_gcd :: Integral a => a -> a -> (a,a,a)
-extended_gcd a b = loop a b 0 1 1 0
- where loop a b x lastx y lasty
- | b /= 0 = let (q,b') = divMod a b
- x' = lastx - q * x
- y' = lasty - q * y
- in x' `seq` y' `seq` loop b b' x' x y' y
- | otherwise = (lastx,lasty,a)
-
-
Oops, something went wrong.

0 comments on commit 6a1dcb1

Please sign in to comment.