squiggle.c

Self-contained Monte Carlo estimation in C99
Log | Files | Refs | README

commit d2db239a1d2cb812a85ad06449ab94a48ea6ac66
parent 4874f1fa9c394c898e8f88865b7eca14b5683715
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Fri,  2 Feb 2024 18:06:58 +0100

remove histogram caveat after reviewing; style tweaks

Diffstat:
MREADME.md | 4+---
Msquiggle_more.c | 1-
2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/README.md b/README.md @@ -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 ``` diff --git a/squiggle_more.c b/squiggle_more.c @@ -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;