remove histogram caveat after reviewing; style tweaks

This commit is contained in:
NunoSempere 2024-02-02 18:06:58 +01:00
parent 4874f1fa9c
commit d2db239a1d
2 changed files with 1 additions and 4 deletions

View File

@ -33,8 +33,6 @@ This code should aim to be correct, then simple, then fast.
Note that being terse, or avoiding verbosity, is a non-goal. This is in part because of the constraints that C imposes. But it also aids with clarity and conceptual simplicity, as the issue of correlated samples illustrates in the next section.
Caveats: Parallelism might hide monsters. The histogram function is pretty but was created with the aid of GPT, and so might have errors.
## Getting started
Download squiggle.c, for instance:
@ -260,7 +258,7 @@ double sample_model(uint64_t* seed){
```
# When compiling:
gcc -std=c99 -Wall -O3 example.c squiggle.c squiggle_more.c -lm -o ./example
$ gcc -std=c99 -Wall -O3 example.c squiggle.c squiggle_more.c -lm -o ./example
```

View File

@ -229,7 +229,6 @@ void array_print_stats(double xs[], int n)
void array_print_histogram(double* xs, int n_samples, int n_bins)
{
// Interface inspired by <https://github.com/red-data-tools/YouPlot>
// Generated with the help of an llm; there might be subtle off-by-one errors
if (n_bins <= 1) {
fprintf(stderr, "Number of bins must be greater than 1.\n");
return;