Commit 0092a0c8 authored by AVANZINI Martin's avatar AVANZINI Martin
Browse files

mathematical background

parent 7b6a6267
......@@ -43,9 +43,10 @@ factorb = do
isPrime <- var "isPrime"
done <- var "done"
while' (x .>= 1 ) $ do
while' (x .>= 2 ) $ do
-- x = uniform(1,x)
x .~ rand (x + 1)
x .~ rand x
x .= x + 1
-- if x is prime
tick
-- (isPrime .= 1) .<|> (isPrime .= 0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment