tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
4
Task/Random-numbers/OCaml/random-numbers.ocaml
Normal file
4
Task/Random-numbers/OCaml/random-numbers.ocaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
let pi = 4. *. atan 1.;;
|
||||
let random_gaussian () =
|
||||
1. +. sqrt (-2. *. log (Random.float 1.)) *. cos (2. *. pi *. Random.float 1.);;
|
||||
let a = Array.init 1000 (fun _ -> random_gaussian ());;
|
||||
Loading…
Add table
Add a link
Reference in a new issue