fast-mult 0.1.0.1 → 0.1.0.2
raw patch · 2 files changed
+10/−10 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- fast-mult.cabal +1/−1
- src/Data/FastMult/Internal.hs +9/−9
fast-mult.cabal view
@@ -1,5 +1,5 @@ name: fast-mult-version: 0.1.0.1+version: 0.1.0.2 synopsis: Numeric type with asymptotically faster multiplications. description: This numeric type internally reorders multiplications to achieve asymptotically faster multiplication of large numbers of small integers in particular.
src/Data/FastMult/Internal.hs view
@@ -65,15 +65,15 @@ unsigned machine word and multiply them by item 2 in the list above. Only then if the result overflows we place them in this 'BigNat' list. - This is a few examples of "MachineWords -> Scale"+ This is a few examples of "MachineWords: Scale" - 2 -> 0- 3 -> 1- 4 -> 1- 5 -> 2- 6..8 -> 2- 9..16 -> 3- 17..32 -> 4+ * 2: 0+ * 3: 1+ * 4: 1+ * 5: 2+ * 6..8: 2+ * 9..16: 3+ * 17..32: 4 etc. @@ -218,7 +218,7 @@ mergeWithCarry carry xl Strict.Nil = mergeOneCarry carry xl mergeWithCarry carry Strict.Nil yl = mergeOneCarry carry yl mergeWithCarry carry xl@(x:!xs) yl@(y:!ys) = case multBigNatWithScale x y of- ScaleEQ result -> mergeWithCarry carry xs ys+ ScaleEQ result -> carry :! mergeWithCarry result xs ys ScaleLT -> contCarry x xs yl ScaleGT -> contCarry y ys xl where