fun: save on stack overflow
just reduce the num of samples to avoid it
This commit is contained in:
parent
13194bc3ca
commit
7ce4658d30
Binary file not shown.
Binary file not shown.
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user