Skip to content

Commit

Permalink
Minor housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
idontgetoutmuch authored and curiousleo committed May 19, 2020
1 parent 62c10fa commit a290c8d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions System/Random.hs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ import GHC.Exts (Ptr(..))
import GHC.ForeignPtr
import System.IO.Unsafe (unsafePerformIO)
import qualified System.Random.SplitMix as SM
import Data.Bits
import GHC.Base
import GHC.Word

Expand Down Expand Up @@ -996,7 +995,7 @@ instance UniformRange Double where
return $ (h - l) * x + l

-- | Turns a given uniformly distributed 'Word64' value into a uniformly
-- distributed 'Double' value.
-- distributed 'Double' value in the range [0, 1).
word64ToDoubleInUnitInterval :: Word64 -> Double
word64ToDoubleInUnitInterval w64 = between1and2 - 1.0
where
Expand Down Expand Up @@ -1047,7 +1046,7 @@ instance UniformRange Float where
return $ (h - l) * x + l

-- | Turns a given uniformly distributed 'Word32' value into a uniformly
-- distributed 'Float' value.
-- distributed 'Float' value in the range [0,1).
word32ToFloatInUnitInterval :: Word32 -> Float
word32ToFloatInUnitInterval w32 = between1and2 - 1.0
where
Expand Down

0 comments on commit a290c8d

Please sign in to comment.