forked from personal/squiggle.c
fix: compilation errors after api drift
This commit is contained in:
parent
65a104e089
commit
219096a517
Binary file not shown.
|
@ -9,6 +9,7 @@ int main()
|
|||
uint64_t* seed = malloc(sizeof(uint64_t));
|
||||
*seed = 1000; // xorshift can't start with 0
|
||||
|
||||
|
||||
// ...
|
||||
|
||||
free(seed);
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -14,7 +14,7 @@ int main()
|
|||
uint64_t* seed = malloc(sizeof(uint64_t));
|
||||
*seed = 1000; // xorshift can't start with 0
|
||||
|
||||
struct c_i beta_1_2_ci_90 = get_90_confidence_interval(beta_1_2_sampler, seed);
|
||||
ci beta_1_2_ci_90 = get_90_confidence_interval(beta_1_2_sampler, seed);
|
||||
printf("90%% confidence interval of beta(1,2) is [%f, %f]\n", beta_1_2_ci_90.low, beta_1_2_ci_90.high);
|
||||
|
||||
free(seed);
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -33,7 +33,7 @@ int main()
|
|||
result[i] = sample_minutes_per_day_jumping_rope_needed_to_burn_10kg(seed);
|
||||
}
|
||||
|
||||
printf("How many minutes per day do I have to jump rope to lose 10kg of fat by the end of the year?\n");
|
||||
printf("## How many minutes per day do I have to jump rope to lose 10kg of fat by the end of the year?\n");
|
||||
printf("Mean: %f\n", array_mean(result, n));
|
||||
printf("A few samples: [ ");
|
||||
for (int i = 0; i < 9; i++) {
|
||||
|
@ -41,8 +41,10 @@ int main()
|
|||
}
|
||||
printf("... ]\n");
|
||||
|
||||
struct c_i c_i_90 = get_90_confidence_interval(sample_minutes_per_day_jumping_rope_needed_to_burn_10kg, seed);
|
||||
printf("90%% confidence interval: [%f, %f]\n", c_i_90.low, c_i_90.high);
|
||||
ci ci_90 = get_90_confidence_interval(sample_minutes_per_day_jumping_rope_needed_to_burn_10kg, seed);
|
||||
printf("90%% confidence interval: [%f, %f]\n", ci_90.low, ci_90.high);
|
||||
|
||||
|
||||
|
||||
free(seed);
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user