We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c792b51 commit 965d0b6Copy full SHA for 965d0b6
1 file changed
src/Test/QuickCheck/LCG.purs
@@ -13,9 +13,7 @@ import Math ((%))
13
import Control.Monad.Eff (Eff())
14
import Control.Monad.Eff.Random (RANDOM(), randomInt)
15
import Data.Int (fromNumber, toNumber)
16
-import Data.Int.Bits (shl, (.|.))
17
-import Data.Array (replicate)
18
-import Data.Foldable (product)
+import Data.Int.Bits (shl)
19
import qualified Data.Maybe.Unsafe as U
20
21
type Seed = Int
@@ -30,7 +28,7 @@ lcgC = 0
30
28
31
29
-- | The *modulus*: a magic constant for the linear congruential generator
32
lcgN :: Int
33
-lcgN = product (replicate 31 2) - 1
+lcgN = 1 `shl` 31 - 1
34
35
-- | Step the linear congruential generator
36
lcgNext :: Int -> Int
0 commit comments