squiggle.c

Self-contained Monte Carlo estimation in C99
Log | Files | Refs | README

commit e971d6e1e2fe743e5f0cdcf14713defd52a955b7
parent 3e2eb69e3a01028d1d0796970b1c81e261b03427
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Wed, 31 Jan 2024 15:27:03 +0100

fix: x[i] -> xs[i] bug

Diffstat:
Msquiggle_more.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/squiggle_more.c b/squiggle_more.c @@ -336,9 +336,9 @@ void array_print_90_ci_histogram(double* xs, int n_samples, int n_bins){ // Fill the bins with sample counts int below_min = 0, above_max = 0; for (int i = 0; i < n_samples; i++) { - if(x[i] < min_value){ + if(xs[i] < min_value){ below_min++; - }else if (x[i] > max_value){ + }else if (xs[i] > max_value){ above_max++; }else{ int bin_index = (int)((xs[i] - min_value) / bin_width);