fun: save on stack overflow

just reduce the num of samples to avoid it
This commit is contained in:
NunoSempere 2023-10-15 01:00:47 +01:00
parent 13194bc3ca
commit 7ce4658d30
3 changed files with 1 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -92,7 +92,7 @@ let () =
let p3 = p1 *. p2 in let p3 = p1 *. p2 in
let weights = [ 1. -. p3; p3 /. 2.; p3 /. 4.; p3/. 4. ] in let weights = [ 1. -. p3; p3 /. 2.; p3 /. 4.; p3/. 4. ] in
let sampler () = mixture [ sample0; sample1; sampleFew; sampleMany ] weights 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 let samples = List.init n (fun _ -> sampler ()) in
match unwind samples with match unwind samples with
| Error err -> Printf.printf "Error %s\n" err | Error err -> Printf.printf "Error %s\n" err