forked from personal/squiggle.c
increase precision a bit
This commit is contained in:
parent
3a7f9a9d41
commit
4bf13f3c22
examples/more
00_example_template
01_sample_from_cdf
02_sample_from_cdf_beta
03_ci_beta
04_nuclear_war
05_burn_10kg_fat
06_nuclear_recovery
07_algebra
08_algebra_and_conversion
09_ergonomic_algebra
10_twitter_thread_example
11_billion_lognormals_paralell
12_time_to_botec_parallel
13_parallelize_min
14_check_confidence_interval
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user