Notes / References for constructing a splitmix rng that follows the lea&steele fixes...
authorCarter Tazio Schonwald <carter.schonwald@gmail.com>
Tue, 26 Dec 2017 01:13:33 +0000 (20:13 -0500)
committerCarter Tazio Schonwald <carter.schonwald@gmail.com>
Tue, 26 Dec 2017 01:13:33 +0000 (20:13 -0500)
src/System/Random/SplitMix/Internal.hs

index ef04cc4..c40e451 100644 (file)
@@ -21,6 +21,20 @@ import Data.Word(Word64)
 import Data.Functor.Identity
 import Data.Data(Data(),Typeable())
 
+{-
+splitmix constants follows
+https://github.com/dmlloyd/openjdk/blob/67672eec97164de10a9ca83ddbcef6b42816ed04/src/java.base/share/classes/java/util/SplittableRandom.java
+
+see also
+http://hg.openjdk.java.net/jdk/jdk10/file/bffcbf07ea88/src/java.base/share/classes/java/util/SplittableRandom.java
+
+ie the variant found in JDK >=8
+
+see also discussion on the melissa o'neil pcg blog about
+splitmix
+http://www.pcg-random.org/posts/bugs-in-splitmix.html
+-}
+
 {-# SPECIALIZE popCount :: Word64 -> Word64 #-}
 {-# SPECIALIZE popCount :: Int -> Word64 #-}
 {-# SPECIALIZE popCount :: Word -> Word64 #-}