Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Random-numbers/Lingo/random-numbers-1.lingo
Normal file
5
Task/Random-numbers/Lingo/random-numbers-1.lingo
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-- Returns a random float value in range 0..1
|
||||
on randf ()
|
||||
n = random(the maxinteger)-1
|
||||
return n / float(the maxinteger-1)
|
||||
end
|
||||
4
Task/Random-numbers/Lingo/random-numbers-2.lingo
Normal file
4
Task/Random-numbers/Lingo/random-numbers-2.lingo
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
normal = []
|
||||
repeat with i = 1 to 1000
|
||||
normal.add(1 + sqrt(-2 * log(randf())) * cos(2 * PI * randf()) / 2)
|
||||
end repeat
|
||||
Loading…
Add table
Add a link
Reference in a new issue