increase precision a bit

This commit is contained in:
NunoSempere 2024-01-30 20:09:45 +01:00
parent 3a7f9a9d41
commit 4bf13f3c22
16 changed files with 4 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -276,13 +276,13 @@ void array_print_histogram(double* xs, int n_samples, int n_bins) {
double bin_start = min_value + i * bin_width;
double bin_end = bin_start + bin_width;
if(bin_width < 0.01){
printf(" [%4.3f, %4.3f): ", bin_start, bin_end);
printf(" [%4.4f, %4.4f): ", bin_start, bin_end);
} else if(bin_width < 0.1){
printf(" [%4.2f, %4.2f): ", bin_start, bin_end);
printf(" [%4.3f, %4.3f): ", bin_start, bin_end);
} else if(bin_width < 1){
printf(" [%4.1f, %4.1f): ", bin_start, bin_end);
printf(" [%4.2f, %4.2f): ", bin_start, bin_end);
} else if(bin_width < 10){
printf(" [%4.0f, %4.0f): ", bin_start, bin_end);
printf(" [%4.1f, %4.1f): ", bin_start, bin_end);
} else {
printf(" [%4f, %4f): ", bin_start, bin_end);
}