Hello community,

here is the log from the commit of package ghc-mwc-random for openSUSE:Factory 
checked in at 2017-06-04 01:54:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-mwc-random (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-mwc-random.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-mwc-random"

Sun Jun  4 01:54:49 2017 rev:5 rq:494179 version:0.13.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-mwc-random/ghc-mwc-random.changes    
2017-01-12 15:50:53.605389041 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-mwc-random.new/ghc-mwc-random.changes       
2017-06-04 01:54:50.262509770 +0200
@@ -1,0 +2,5 @@
+Wed May  3 08:13:52 UTC 2017 - [email protected]
+
+- Update to version 0.13.6.0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  mwc-random-0.13.5.0.tar.gz

New:
----
  mwc-random-0.13.6.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-mwc-random.spec ++++++
--- /var/tmp/diff_new_pack.PAlY2s/_old  2017-06-04 01:54:50.802433490 +0200
+++ /var/tmp/diff_new_pack.PAlY2s/_new  2017-06-04 01:54:50.806432925 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-mwc-random
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %global pkg_name mwc-random
 Name:           ghc-%{pkg_name}
-Version:        0.13.5.0
+Version:        0.13.6.0
 Release:        0
 Summary:        Fast, high quality pseudo random number generation
 License:        BSD-2-Clause
@@ -26,6 +26,7 @@
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
+BuildRequires:  ghc-math-functions-devel
 BuildRequires:  ghc-primitive-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel

++++++ mwc-random-0.13.5.0.tar.gz -> mwc-random-0.13.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mwc-random-0.13.5.0/System/Random/MWC/CondensedTable.hs 
new/mwc-random-0.13.6.0/System/Random/MWC/CondensedTable.hs
--- old/mwc-random-0.13.5.0/System/Random/MWC/CondensedTable.hs 2016-12-01 
14:29:55.000000000 +0100
+++ new/mwc-random-0.13.6.0/System/Random/MWC/CondensedTable.hs 2017-04-27 
14:54:49.000000000 +0200
@@ -40,6 +40,7 @@
 import qualified Data.Vector.Unboxed         as U
 import qualified Data.Vector                 as V
 import Data.Vector.Generic (Vector)
+import Numeric.SpecFunctions (logFactorial)
 
 import Prelude hiding ((++))
 
@@ -237,9 +238,11 @@
                   ++ U.tail (U.unfoldr unfoldBackward (pMax, nMax))
       where
         -- Number with highest probability and its probability
+        --
+        -- FIXME: this is not ideal precision-wise. Check if code
+        --        from statistics gives better precision.
         nMax = floor lam :: Int
-        pMax = let c = lam * exp( -lam / fromIntegral nMax )
-               in  U.foldl' (\p i -> p * c / i) 1 (U.enumFromN 1 nMax)
+        pMax = exp $ fromIntegral nMax * log lam - lam - logFactorial nMax
         -- Build probability list
         unfoldForward (p,i)
           | p < minP  = Nothing
@@ -252,6 +255,7 @@
           | otherwise = Just ( (i,p)
                              , (p / lam * fromIntegral i, i-1)
                              )
+    -- Minimal representable probability for condensed tables
     minP = 1.1641532182693481e-10 -- 2**(-33)
 
 -- | Create a lookup table for the binomial distribution.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mwc-random-0.13.5.0/changelog.md 
new/mwc-random-0.13.6.0/changelog.md
--- old/mwc-random-0.13.5.0/changelog.md        2016-12-01 14:29:55.000000000 
+0100
+++ new/mwc-random-0.13.6.0/changelog.md        2017-04-27 14:54:49.000000000 
+0200
@@ -1,3 +1,8 @@
+## Changes in 0.13.6.0
+
+  * `tablePoisson` now can handle λ>1923, see #59 for details.
+    That required intoduction of dependency on math-functions.
+
 ## Changes in 0.13.5.0
 
   * `logCategorical` added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mwc-random-0.13.5.0/mwc-random.cabal 
new/mwc-random-0.13.6.0/mwc-random.cabal
--- old/mwc-random-0.13.5.0/mwc-random.cabal    2016-12-01 14:29:55.000000000 
+0100
+++ new/mwc-random-0.13.6.0/mwc-random.cabal    2017-04-27 14:54:49.000000000 
+0200
@@ -1,5 +1,5 @@
 name:           mwc-random
-version:        0.13.5.0
+version:        0.13.6.0
 synopsis:       Fast, high quality pseudo random number generation
 description:
   This package contains code for generating high quality random
@@ -44,7 +44,8 @@
     base < 5,
     primitive,
     time,
-    vector >= 0.7
+    vector         >= 0.7,
+    math-functions >= 0.2.1.0
   if impl(ghc >= 6.10)
     build-depends:
       base >= 4


Reply via email to