FixedPoint-simple 0.4 → 0.4.1
raw patch · 2 files changed
+5/−3 lines, 2 files
Files
- Data/FixedPoint.lhs +2/−2
- FixedPoint-simple.cabal +3/−1
Data/FixedPoint.lhs view
@@ -587,7 +587,7 @@ > fromInteger i = if i < 0 then negate (BigInt $ fromInteger (abs i)) > else BigInt (fromInteger i) >-> instance (Bits a, Ord a) => Bits (BigInt a) where+> instance (Bits a, Num a, Ord a) => Bits (BigInt a) where > (.&.) a b = BigInt (unBI a .&. unBI b) > (.|.) a b = BigInt (unBI a .|. unBI b) > xor a b = BigInt (unBI a `xor` unBI b)@@ -629,7 +629,7 @@ > toRational = fromIntegral > >-> instance (Bounded a, Ord a, Bits a) => Bounded (BigInt a) where+> instance (Bounded a, Ord a, Bits a, Num a) => Bounded (BigInt a) where > minBound = let r = fromIntegral (negate (2^ (bitSize r - 1))) in r > maxBound = let r = fromIntegral (2^(bitSize r - 1) - 1) in r >
FixedPoint-simple.cabal view
@@ -1,5 +1,5 @@ Name: FixedPoint-simple-Version: 0.4+Version: 0.4.1 Synopsis: Fixed point, large word, and large int numerical representations (types and common class instances) Description: This library uses elementary techniques to implement fixed point types in terms of basic integrals such as Word64. All mathematical operations are implemented@@ -15,6 +15,8 @@ Build-type: Simple -- Extra-source-files: Cabal-version: >=1.8++Homepage: https://github.com/TomMD/FixedPoint Library