This commit is contained in:
Michael Pilosov 2024-05-18 20:59:44 +00:00
parent 6193828258
commit 071c386136
3 changed files with 1 additions and 3 deletions

View File

@ -5,7 +5,7 @@
Install the Haskell build tool `stack` and ensure `~/.local/bin` is in your `$PATH`
```
curl -sSL https://get.haskellstack.org/ | sh
curl -sSL https://get.haskellstack.org | sh -s - -d ~/.local/bin
```
Run the demo:

View File

@ -30,4 +30,3 @@ main = do
normalPointsAR <- generateNormalPointsAR 10 0 1
putStrLn "Normal distribution points (Acceptance-Rejection):"
print normalPointsAR

View File

@ -22,4 +22,3 @@ boxMullerTransform mu sigma (u1:u2:us) =
z1 = sqrt (-2 * log u1) * sin (2 * pi * u2)
in (mu + z0 * sigma) : (mu + z1 * sigma) : boxMullerTransform mu sigma us
boxMullerTransform _ _ _ = [] -- If input list is not in pairs, return empty list