Skip to content

Commit

Permalink
Change distribution of smallDenominators.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChickenProp committed Jan 8, 2025
1 parent ad62910 commit a1047d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Test/QuickCheck/Arbitrary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,8 @@ instance Arbitrary Float where
]
where
smallDenominators = sized $ \n -> do
i <- chooseInt (0, n)
pure (fromRational (streamNth (min i 256) rationalUniverse))
i <- chooseInt (0, min n 256)
pure (fromRational (streamNth i rationalUniverse))

uniform = sized $ \n -> do
let n' = toInteger n
Expand All @@ -748,8 +748,8 @@ instance Arbitrary Double where
]
where
smallDenominators = sized $ \n -> do
i <- chooseInt (0, n)
pure (fromRational (streamNth (min i 256) rationalUniverse))
i <- chooseInt (0, min n 256)
pure (fromRational (streamNth i rationalUniverse))

uniform = sized $ \n -> do
let n' = toInteger n
Expand Down

0 comments on commit a1047d3

Please sign in to comment.