commit 7ce4658d30d7742d22a6e3d5bf8321f4019b7894
parent 13194bc3cabc2e0e5d7eeb6b361575badf4e7360
Author: NunoSempere <nuno.sempere@protonmail.com>
Date: Sun, 15 Oct 2023 01:00:47 +0100
fun: save on stack overflow
just reduce the num of samples to avoid it
Diffstat:
3 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/ocaml/out/samples b/ocaml/out/samples
Binary files differ.
diff --git a/ocaml/out/samples.o b/ocaml/out/samples.o
Binary files differ.
diff --git a/ocaml/samples.ml b/ocaml/samples.ml
@@ -92,7 +92,7 @@ let () =
let p3 = p1 *. p2 in
let weights = [ 1. -. p3; p3 /. 2.; p3 /. 4.; p3/. 4. ] in
let sampler () = mixture [ sample0; sample1; sampleFew; sampleMany ] weights in
- let n = 1_000 in
+ let n = 1_000_000 in
let samples = List.init n (fun _ -> sampler ()) in
match unwind samples with
| Error err -> Printf.printf "Error %s\n" err