cyclotomic 1.1.1 → 1.1.2
raw patch · 2 files changed
+10/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- cyclotomic.cabal +1/−1
- src/Data/Complex/Cyclotomic.hs +9/−3
cyclotomic.cabal view
@@ -1,5 +1,5 @@ Name: cyclotomic-Version: 1.1.1+Version: 1.1.2 Stability: stable Synopsis: A subfield of the complex numbers for exact calculation. Description: The cyclotomic numbers are a subset of the
src/Data/Complex/Cyclotomic.hs view
@@ -166,11 +166,17 @@ | n == 1 = Cyclotomic 1 (M.singleton 0 1) | otherwise = cyclotomic n $ convertToBase n (M.singleton 1 1) +-- instance Show Cyclotomic where+-- show (Cyclotomic n mp)+-- | mp == M.empty = "0"+-- | otherwise = leadingTerm rat n ex ++ followingTerms n xs+-- where ((ex,rat):xs) = M.toList mp+ instance Show Cyclotomic where show (Cyclotomic n mp)- | mp == M.empty = "0"- | otherwise = leadingTerm rat n ex ++ followingTerms n xs- where ((ex,rat):xs) = M.toList mp+ = case M.toList mp of+ [] -> "0"+ ((ex,rat):xs) -> leadingTerm rat n ex ++ followingTerms n xs showBaseExp :: Integer -> Integer -> String showBaseExp n 1 = "e(" ++ show n ++ ")"