MUD.hs/test/TestRandomUtils.hs
Michael Pilosov 32cdc46325 working code
2024-05-18 01:52:08 +00:00

19 lines
602 B
Haskell

-- TestRandomUtils.hs
module TestRandomUtils (tests) where
import RandomUtils (generateUniformPoints, generateNormalPoints)
-- Define your tests here
tests :: IO ()
tests = do
-- Generate 10 random points from a uniform distribution in the range [-1, 1]
uniformPoints <- generateUniformPoints 10 (-1, 1)
putStrLn "Uniform distribution points:"
print uniformPoints
-- Generate 10 random points from a normal distribution using the Box-Muller transform
normalPoints <- generateNormalPoints 10 0 1
putStrLn "Normal distribution points (Box-Muller):"
print normalPoints