MUD.hs/test/TestRandomUtils.hs

19 lines
602 B
Haskell
Raw Normal View History

2024-05-18 01:47:18 +00:00
-- 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