packages feed

scientific 0.3.3.5 → 0.3.3.6

raw patch · 3 files changed

+15/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

changelog view
@@ -1,3 +1,14 @@+0.3.3.6+	* Fixed bug in the x / y method for Scientific. Since I was using+	  the default implementation: `x * recip y` the operation would+	  diverge when `recip y` had an infinite decimal output.+	  This shouldn't happen when the result of / is finite again.+	  For example: 0.6 / 0.3 should yield 2.0.++	  This is now fixed by using the following implementation:++	  `x / y = fromRational $ toRational x / toRational y`+ 0.3.3.5 	* Fixed bug when converting the Scientific: 	  `scientific 0 someBigExponent` to a bounded Integral using toBoundedInteger
scientific.cabal view
@@ -1,5 +1,5 @@ name:                scientific-version:             0.3.3.5+version:             0.3.3.6 synopsis:            Numbers represented using scientific notation description:   @Data.Scientific@ provides a space efficient and arbitrary precision
src/Data/Scientific.hs view
@@ -236,6 +236,9 @@     recip = fromRational . recip . toRational     {-# INLINE recip #-} +    x / y = fromRational $ toRational x / toRational y+    {-# INLINE (/) #-}+     fromRational rational = positivize (longDiv 0 0) (numerator rational)       where         -- Divide the numerator by the denominator using long division.