remove histogram caveat after reviewing; style tweaks

master
NunoSempere 3 months ago
parent 4874f1fa9c
commit d2db239a1d

@ -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
```

@ -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;

Loading…
Cancel
Save