Skip to content

Commit 6c508fb

Browse files
committed
qf math tests and docs
1 parent effe204 commit 6c508fb

50 files changed

Lines changed: 3233 additions & 664 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Deploy static docs/ to GitHub Pages (see repo Settings → Pages → GitHub Actions).
1+
# Deploy static pages/ to GitHub Pages (see repo Settings → Pages → GitHub Actions).
22

33
name: Pages
44

@@ -33,7 +33,7 @@ jobs:
3333
- name: Upload Pages artifact
3434
uses: actions/upload-pages-artifact@v3
3535
with:
36-
path: docs
36+
path: pages
3737

3838
- name: Deploy to GitHub Pages
3939
id: deployment

.gitignore

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,52 @@
1+
# --- Local build trees (Makefile, CMake, IDEs)
12
/build/
2-
examples/esp32s3_benchmark/build/
3-
examples/esp32s3_benchmark/sdkconfig
4-
examples/esp32s3_benchmark/sdkconfig.old
5-
examples/lilygo_t_display_s3_bench/.pio/
3+
**/build/
4+
cmake-build-*/
5+
CMakeFiles/
6+
CMakeCache.txt
7+
CMakeScripts/
8+
CTestTestfile.cmake
9+
_deps/
10+
DartConfiguration.tcl
11+
Makefile.cmake
12+
cmake_install.cmake
13+
install_manifest*.txt
14+
15+
# Compiled objects / libraries / binaries
16+
*.o
17+
*.obj
18+
*.a
19+
*.lib
20+
*.so
21+
*.so.*
22+
*.dylib
23+
*.dll
24+
*.exe
25+
*.out
26+
*.app
27+
compile_commands.json
28+
*.d # GCC -MD dependency files
29+
30+
# PlatformIO / embedded toolchains
31+
.pio/
32+
33+
# ESP-IDF / Arduino sketch exports (often regenerated)
34+
**/sdkconfig
35+
**/sdkconfig.old
36+
37+
# Python
38+
__pycache__/
39+
*.py[cod]
40+
*.egg-info/
41+
.eggs/
42+
.pytest_cache/
43+
.mypy_cache/
44+
.ruff_cache/
45+
46+
# Coverage / sanitizers (keep patterns if tooling adds more)
647
*.gcda
748
*.gcno
849
*.gcov
50+
51+
# OS / editors
52+
.DS_Store

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ idf_component_register(
1313
SRCS "src/qf_math.c"
1414
INCLUDE_DIRS "src"
1515
)
16+
17+
target_compile_options(${COMPONENT_LIB} PRIVATE
18+
-Wall
19+
-Wextra
20+
-Wshadow
21+
-Wconversion
22+
-Werror
23+
)

Makefile

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
# @author M A Chatterjee <deftio [at] deftio [dot] com>
33

44
CC ?= gcc
5-
CFLAGS = -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Werror -Os -std=c99
6-
CFLAGS_RELAX = -Wall -Wextra -Os -std=c99 -Wno-unused-parameter -Wno-conversion
5+
CXX ?= g++
6+
CFLAGS_WARN = -Wall -Wextra -Wpedantic -Wshadow -Wconversion
7+
CFLAGS = $(CFLAGS_WARN) -Werror -Os -std=c99
8+
CFLAGS_RELAX = -Wall -Wextra -Wshadow -Os -std=c99 -Wno-unused-parameter -Wno-conversion
9+
CXXFLAGS_WARN = -Wall -Wextra -Wpedantic -Wshadow -Wconversion
10+
CXXFLAGS = $(CXXFLAGS_WARN) -Werror -Os -std=c++11
711
LDFLAGS = -lm
812

913
# Defined only for test binaries so internal helpers can be exercised (coverage).
@@ -17,6 +21,7 @@ BUILD = build
1721
SRC = $(SRCDIR)/qf_math.c
1822
HDR = $(SRCDIR)/qf_math.h
1923
TEST_SRC = $(TESTDIR)/qf_math_test.c
24+
CPP_TEST_SRC = $(TESTDIR)/qf_math_cpp_test.cpp
2025

2126
# --- compare/ harness (deps under build/compare/third_party/) ---
2227
COMP_DIR = $(BUILD)/compare
@@ -30,6 +35,10 @@ COMPARE_STAMP = $(COMP_DIR)/.deps-ready
3035
LIBFIXMATH_SRCS = fix16.c fract32.c uint32.c fix16_trig.c fix16_sqrt.c fix16_exp.c
3136
LIBFIXMATH_OBJS = $(addprefix $(COMP_OBJ)/lf_,$(LIBFIXMATH_SRCS:.c=.o))
3237
FR_MATH_OBJ = $(COMP_OBJ)/fr_math.o
38+
FR_MATH_FULL_OBJ = $(COMP_OBJ)/fr_math_full.o
39+
FR_MATH_LEAN_OBJ = $(COMP_OBJ)/fr_math_lean.o
40+
FASTTRIG_ESP32_OBJ = examples/lilygo_t_display_s3_bench/.pio/build/lilygo-t-display-s3/libd57/FastTrig/FastTrig.cpp.o
41+
XTENSA_ESP32S3_SIZE = $(HOME)/.platformio/packages/toolchain-xtensa-esp32s3/bin/xtensa-esp32s3-elf-size
3342

3443
.PHONY: help
3544
help:
@@ -42,7 +51,7 @@ help:
4251
@echo " lib-lean Build qf_math_lean.o (-DQF_MATH_LEAN, peer-comparable size)"
4352
@echo " test Build and run unit tests"
4453
@echo " bench Build and run qf_math vs libm benchmark"
45-
@echo " docs-pages Inject fresh bench sweep into docs/pages/index.html"
54+
@echo " docs-pages Inject fresh bench sweep into pages/index.html"
4655
@echo ""
4756
@echo "Comparison (see compare/README.md):"
4857
@echo " compare-deps Fetch libfixmath + fr_math into $(COMP_THIRD)/"
@@ -52,8 +61,9 @@ help:
5261
@echo " compare-matrix Alias for compare"
5362
@echo " compare-tests Run libfixmath upstream tests_ro64 (CMake)"
5463
@echo " compare-fr-tests Run fr_math upstream makefile test suite"
55-
@echo " mcu-benchmark-snapshot Flash LilyGO bench → compare/MCU_BENCHMARK_SNAPSHOT.md (USB)"
64+
@echo " mcu-benchmark-snapshot Flash MCU bench → compare/MCU_BENCHMARK_SNAPSHOT*.md (USB)"
5665
@echo " benchmark-crossplatform Merge host + MCU snapshots → compare/BENCHMARK_CROSSPLATFORM.md"
66+
@echo " benchmark-arch-speed Build qf_math architecture speed matrix"
5767
@echo ""
5868
@echo "Analysis:"
5969
@echo " size Show compiled object size"
@@ -84,16 +94,21 @@ $(BUILD)/qf_math_lean.o: $(SRC) $(HDR)
8494
$(CC) $(CFLAGS) -DQF_MATH_LEAN -c $(SRC) -o $@
8595

8696
.PHONY: test
87-
test: dirs $(BUILD)/qf_math_test
97+
test: dirs $(BUILD)/qf_math_test $(BUILD)/qf_math_cpp_test
8898
@echo "Running qf_math tests..."
8999
@echo ""
90100
@$(BUILD)/qf_math_test
101+
@$(BUILD)/qf_math_cpp_test
91102

92103
$(BUILD)/qf_math_test: $(TEST_SRC) $(SRC) $(HDR)
93-
$(CC) -Wall -Wextra -Os -std=c99 -I$(SRCDIR) $(CFLAGS_TEST) $(TEST_SRC) $(SRC) $(LDFLAGS) -o $@
104+
$(CC) $(CFLAGS_WARN) -Os -std=c99 -I$(SRCDIR) $(CFLAGS_TEST) $(TEST_SRC) $(SRC) $(LDFLAGS) -o $@
105+
106+
$(BUILD)/qf_math_cpp_test: $(CPP_TEST_SRC) $(SRC) $(HDR) $(SRCDIR)/qf_math.hpp
107+
$(CC) $(CFLAGS) -c $(SRC) -o $(BUILD)/qf_math_cpp_test_qf_math.o
108+
$(CXX) $(CXXFLAGS) -I$(SRCDIR) $(CPP_TEST_SRC) $(BUILD)/qf_math_cpp_test_qf_math.o $(LDFLAGS) -o $@
94109

95110
$(BUILD)/qf_math_bench: $(TOOLSDIR)/qf_math_bench.c $(SRC) $(HDR)
96-
$(CC) -Wall -Wextra -Os -std=c99 -I$(SRCDIR) $(TOOLSDIR)/qf_math_bench.c $(SRC) $(LDFLAGS) -o $@
111+
$(CC) $(CFLAGS_WARN) -Os -std=c99 -I$(SRCDIR) $(TOOLSDIR)/qf_math_bench.c $(SRC) $(LDFLAGS) -o $@
97112

98113
.PHONY: bench
99114
bench: dirs $(BUILD)/qf_math_bench
@@ -120,6 +135,14 @@ $(FR_MATH_OBJ): $(FR_MATH_ROOT)/FR_math.c | $(COMPARE_STAMP)
120135
@mkdir -p $(COMP_OBJ)
121136
$(CC) $(CFLAGS_RELAX) -c $< -o $@ -I$(FR_MATH_ROOT) -DFR_NO_PRINT
122137

138+
$(FR_MATH_FULL_OBJ): $(FR_MATH_ROOT)/FR_math.c | $(COMPARE_STAMP)
139+
@mkdir -p $(COMP_OBJ)
140+
$(CC) $(CFLAGS_RELAX) -c $< -o $@ -I$(FR_MATH_ROOT)
141+
142+
$(FR_MATH_LEAN_OBJ): $(FR_MATH_ROOT)/FR_math.c | $(COMPARE_STAMP)
143+
@mkdir -p $(COMP_OBJ)
144+
$(CC) $(CFLAGS_RELAX) -c $< -o $@ -I$(FR_MATH_ROOT) -DFR_LEAN -DFR_NO_PRINT
145+
123146
COMPARE_BIN = $(COMP_DIR)/benchmark_suite
124147

125148
$(COMPARE_BIN): compare/benchmark_suite.c compare/benchmark_core.c $(SRC) $(HDR) $(LIBFIXMATH_OBJS) $(FR_MATH_OBJ)
@@ -132,11 +155,11 @@ compare compare-matrix: dirs compare-deps $(COMPARE_BIN)
132155
@$(COMPARE_BIN)
133156

134157
.PHONY: compare-report
135-
compare-report: lib lib-lean compare-deps $(LIBFIXMATH_OBJS) $(FR_MATH_OBJ)
136-
@bash compare/report_sizes.sh "$(BUILD)/qf_math.o" "$(BUILD)/qf_math_lean.o" "$(FR_MATH_OBJ)" $(LIBFIXMATH_OBJS)
158+
compare-report: lib lib-lean compare-deps $(LIBFIXMATH_OBJS) $(FR_MATH_OBJ) $(FR_MATH_FULL_OBJ) $(FR_MATH_LEAN_OBJ)
159+
@FASTTRIG_O="$(FASTTRIG_ESP32_OBJ)" XTENSA_SIZE="$(XTENSA_ESP32S3_SIZE)" bash compare/report_sizes.sh "$(BUILD)/qf_math.o" "$(BUILD)/qf_math_lean.o" "$(FR_MATH_OBJ)" "$(FR_MATH_FULL_OBJ)" "$(FR_MATH_LEAN_OBJ)" $(LIBFIXMATH_OBJS)
137160

138161
.PHONY: compare-github-report
139-
compare-github-report: lib lib-lean compare-deps $(COMPARE_BIN) $(LIBFIXMATH_OBJS) $(FR_MATH_OBJ)
162+
compare-github-report: lib lib-lean compare-deps $(COMPARE_BIN) $(LIBFIXMATH_OBJS) $(FR_MATH_OBJ) $(FR_MATH_FULL_OBJ) $(FR_MATH_LEAN_OBJ)
140163
@bash compare/gen_github_report.sh
141164

142165
.PHONY: compare-fr-tests
@@ -151,6 +174,10 @@ mcu-benchmark-snapshot: compare-deps
151174
benchmark-crossplatform:
152175
python3 $(TOOLSDIR)/gen_benchmark_crossplatform.py
153176

177+
.PHONY: benchmark-arch-speed
178+
benchmark-arch-speed:
179+
python3 $(TOOLSDIR)/gen_qf_arch_speed.py
180+
154181
.PHONY: compare-tests
155182
compare-tests:
156183
@bash $(TOOLSDIR)/run_libfixmath_tests.sh

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Docs](https://img.shields.io/badge/docs-compare%20%26%20bench-blue.svg)](compare/README.md)
55
[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](src/qf_math.h)
66
[![GitHub](https://img.shields.io/badge/GitHub-repo-181717.svg?logo=github)](https://github.com/deftio/qf_math)
7-
7+
88
[![PlatformIO](https://img.shields.io/badge/PlatformIO-library-teal.svg)](https://registry.platformio.org/libraries/deftio/qf_math)
99
[![Arduino](https://img.shields.io/badge/Arduino-from%20source-teal.svg)](https://github.com/deftio/qf_math)
1010
[![ESP-IDF](https://img.shields.io/badge/ESP--IDF-component-teal.svg)](https://components.espressif.com/components/deftio/qf_math)
@@ -13,9 +13,11 @@
1313

1414
**qf_math** is a compact, dependency-free C99 library for **fast approximate math on IEEE-754 `float`**. It targets embedded firmware where you want predictable cost and small flash footprint: table-driven trig, logarithms, exponentials, `sqrt`, `hypot`, waveform helpers, and a floating-point ADSR envelope—without pulling in full libm semantics on platforms where that matters.
1515

16+
[github.com/deftio/fr_math](github.com/deftio/fr_math) is the fixed point (pure integer) cousin of this library with identical apis.
17+
1618
| | |
1719
|---|---|
18-
| **Language** | C99 (`float` API, `qf` typedef) |
20+
| **Language** | C99 (`float` API, `qf` typedef), plus optional C++ header wrapper |
1921
| **Dependencies** | None at compile time for the library itself |
2022
| **License** | BSD-2-Clause — see `LICENSE.txt` |
2123
| **Layout** | `src/` library · `test/` unit tests · `build/` all binaries & fetched third-party sources |
@@ -42,9 +44,11 @@ For targets **without a hardware FPU** (or when you want to avoid soft-float cos
4244
## Repository layout
4345

4446
```
45-
src/ qf_math.c, qf_math.h — drop-in library
47+
src/ qf_math.c, qf_math.h/.hpp — drop-in C library + C++ wrapper
4648
test/ qf_math_test.c — correctness vs libm on host
47-
examples/ optional demos — ESP-IDF (`examples/esp32s3_benchmark`) + LilyGO T-Display-S3 PlatformIO (`examples/lilygo_t_display_s3_bench`)
49+
docs/ Markdown documentation (algorithms, API, fr_math, integration)
50+
pages/ GitHub Pages site (compact HTML + CSS; deploy via Actions)
51+
examples/ optional demos — ESP-IDF (`esp32s3_benchmark`), LilyGO T-Display-S3 PlatformIO (`lilygo_t_display_s3_bench`), Raspberry Pi Pico 2 Arduino (`pico2_benchmark`)
4852
docker/ multi-arch toolchain image + cross size report (fr_math-style)
4953
compare/ matrices vs other math libs + benchmark harness (see below)
5054
tools/ extra shell helpers & qf_math vs libm micro-benchmark
@@ -101,22 +105,22 @@ Documentation tables live under **`compare/`** (`LIBRARIES.md` for platforms/rep
101105
| `make compare-github-report` | Regenerates **[`compare/BENCHMARK_REPORT.md`](compare/BENCHMARK_REPORT.md)** for GitHub (embedded bench tables + sizes). |
102106
| `make compare-tests` | CMake-builds libfixmath `tests_ro64` under `build/compare/third_party/libfixmath-build` and runs it. |
103107
| `make compare-fr-tests` | Runs **fr_math**’s upstream `make test` against the shallow clone (`compare/run_fr_math_tests.sh`). |
104-
| `make mcu-benchmark-snapshot` | Flash **LilyGO T-Display-S3** bench and rewrite **`compare/MCU_BENCHMARK_SNAPSHOT.md`** via UART (**pio**, **pyserial**). |
105-
| `make benchmark-crossplatform` | Rewrite **`compare/BENCHMARK_CROSSPLATFORM.md`** — Host \| MCU **Speed vs libm** ratios from the two committed snapshots (no hardware). |
108+
| `make mcu-benchmark-snapshot` | Flash MCU bench and rewrite **`compare/MCU_BENCHMARK_SNAPSHOT*.md`** via UART (**pio** / Arduino, **pyserial**). Supports LilyGO T-Display-S3, ESP32-S3, and Raspberry Pi Pico 2. |
109+
| `make benchmark-crossplatform` | Rewrite **`compare/BENCHMARK_CROSSPLATFORM.md`** — Host \| MCU **Speed vs libm** ratios from the committed snapshots (no hardware). |
106110

107111
**Interpretation:** Desktop timings are *not* MCU timings. Bridged benchmarks include float↔fixed overhead that disappears when you stay natively in `fix16_t` / fixed-radix `s32`. The automated `s32` peer row is **fr_math**; other fast libraries are surveyed in [`compare/PEERS.md`](compare/PEERS.md) but are not wired into the reproducible host/ESP32-S3 harness yet. Use these numbers for intuition and regression tracking, not as a substitute for profiling on your silicon.
108112

109-
**On silicon:** **[examples/lilygo_t_display_s3_bench](examples/lilygo_t_display_s3_bench/README.md)** (PlatformIO, **LilyGO T-Display-S3**) or **[examples/esp32s3_benchmark](examples/esp32s3_benchmark/README.md)** (ESP-IDF) runs the **same** [`benchmark_core.c`](compare/benchmark_core.c) loops so UART / USB serial captures wall-clock under Xtensa / newlib `libm`.
113+
**On silicon:** **[examples/lilygo_t_display_s3_bench](examples/lilygo_t_display_s3_bench/README.md)** (PlatformIO, **LilyGO T-Display-S3**), **[examples/esp32s3_benchmark](examples/esp32s3_benchmark/README.md)** (ESP-IDF), or **[examples/pico2_benchmark](examples/pico2_benchmark/)** (Arduino, **Raspberry Pi Pico 2** ARM / RISC-V) run the **same** [`benchmark_core.c`](compare/benchmark_core.c) loops so UART / USB serial captures wall-clock on real hardware.
110114

111-
**Host vs MCU (relative only):** **[compare/BENCHMARK_CROSSPLATFORM.md](compare/BENCHMARK_CROSSPLATFORM.md)** merges **Speed vs libm** tables from [`compare/BENCHMARK_REPORT.md`](compare/BENCHMARK_REPORT.md) (POSIX snapshot) and [`compare/MCU_BENCHMARK_SNAPSHOT.md`](compare/MCU_BENCHMARK_SNAPSHOT.md); regenerate with **`make benchmark-crossplatform`** after refreshing those files.
115+
**Host vs MCU (relative only):** **[compare/BENCHMARK_CROSSPLATFORM.md](compare/BENCHMARK_CROSSPLATFORM.md)** merges **Speed vs libm** tables from [`compare/BENCHMARK_REPORT.md`](compare/BENCHMARK_REPORT.md) (POSIX snapshot) and the MCU snapshots (`MCU_BENCHMARK_SNAPSHOT*.md` — ESP32-S3, Pico 2 ARM, Pico 2 RISC-V); regenerate with **`make benchmark-crossplatform`** after refreshing those files.
112116

113117
---
114118

115119
## Packaging & integration
116120

117121
### PlatformIO
118122

119-
Use `library.json` at the repo root: add this folder as a local library or publish following [PlatformIO library format](https://docs.platformio.org/en/latest/manifests/library-json/index.html). Headers resolve from `src/` (`#include "qf_math.h"`).
123+
Use `library.json` at the repo root: add this folder as a local library or publish following [PlatformIO library format](https://docs.platformio.org/en/latest/manifests/library-json/index.html). Headers resolve from `src/` (`#include "qf_math.h"` for C, `#include "qf_math.hpp"` for C++).
120124

121125
### Espressif ESP-IDF
122126

@@ -132,8 +136,8 @@ Public surface is declared in `src/qf_math.h`:
132136

133137
- **Macros**: clamps, interpolation, deg/rad/BAM, radix bridges (`QF_TO_FR`, …).
134138
- **Trig**: `qf_sin`, `qf_cos`, `qf_tan`, BAM-native variants, inverse trig.
135-
- **Log/exp**: `qf_log2`, `qf_ln`, `qf_log10`, `qf_pow2`, `qf_exp`, `qf_pow10`.
136-
- **Length**: `qf_sqrt`, `qf_hypot`, `qf_hypot_fast8` (piecewise-linear magnitude).
139+
- **Log/exp/pow**: `qf_log2`, `qf_ln`, `qf_log10`, `qf_pow2`, `qf_exp`, `qf_pow10`, `qf_pow`.
140+
- **Length**: `qf_sqrt`, `qf_hypot`, `qf_hypot_fast2`, `qf_hypot_fast8` (piecewise-linear magnitude).
137141
- **Audio-ish**: LFSR noise, PWM/square/saw/triangle waves, `qf_adsr_*` envelope.
138142

139143
Domain violations (`sqrt` of negative, `log` of non-positive) return `QF_DOMAIN_ERROR`.
@@ -144,7 +148,8 @@ Domain violations (`sqrt` of negative, `log` of non-positive) return `QF_DOMAIN_
144148

145149
| File | Purpose |
146150
|------|---------|
147-
| [`docs/`](docs/) | **GitHub Pages** site root (enable *Settings → Pages → GitHub Actions*; live at `https://deftio.github.io/qf_math/` after first deploy). |
151+
| [`docs/`](docs/) | **Markdown documentation** — algorithms, API reference, fr_math relationship, integration guide |
152+
| [`pages/`](pages/) | **GitHub Pages** site (enable *Settings → Pages → GitHub Actions*; live at `https://deftio.github.io/qf_math/` after first deploy) |
148153
| [`compare/README.md`](compare/README.md) | Compare harness docs (`make compare`, sizes, upstream suites, GitHub report) |
149154
| [`compare/BENCHMARK_REPORT.md`](compare/BENCHMARK_REPORT.md) | Last checked-in **host benchmark + size snapshot** (run `make compare-github-report` to refresh) |
150155
| [`compare/BENCHMARK_CROSSPLATFORM.md`](compare/BENCHMARK_CROSSPLATFORM.md) | Host vs MCU **relative** ratios (`make benchmark-crossplatform`; refresh snapshots first) |

agents.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ Guidance for automated coding agents editing this repository.
77
- **`src/`** — Library only (`qf_math.c`, `qf_math.h`). Keep this TU self-contained and allocation-free unless explicitly requested.
88
- **`test/`** — Host-side regression (`qf_math_test.c`). Extend here when changing numerical behavior.
99
- **`compare/`** — Peer-library matrices (`*.md`), benchmark harness (`benchmark_suite.c`, **`benchmark_core.c`** — shared with ESP **`examples/`** trees), fetch/report scripts. All clones/build artifacts stay under `build/compare/`.
10-
- **`examples/`** — Optional on-device benches: **`examples/lilygo_t_display_s3_bench/`** (PlatformIO, LilyGO T-Display-S3) and **`examples/esp32s3_benchmark/`** (ESP-IDF).
10+
- **`examples/`** — Optional on-device benches: **`examples/lilygo_t_display_s3_bench/`** (PlatformIO, LilyGO T-Display-S3), **`examples/esp32s3_benchmark/`** (ESP-IDF), and **`examples/pico2_benchmark/`** (Arduino, Raspberry Pi Pico 2).
11+
- **`docs/`** — Markdown documentation (algorithms, API reference, fr_math relationship, integration guide).
12+
- **`pages/`** — GitHub Pages HTML site (compact single-page bench + overview); deploy via GitHub Actions.
1113
- **`tools/`** — Host helpers (`qf_math_bench.c`, `run_libfixmath_tests.sh`); keep MCU-light.
1214
- **`build/`** — All binaries, CMake trees, cloned deps. Never commit; never author primary sources only here.
1315

@@ -21,8 +23,8 @@ Guidance for automated coding agents editing this repository.
2123
- Upstream libfixmath tests: `make compare-tests`
2224
- Upstream fr_math tests: `make compare-fr-tests`
2325
- Cross-target ROM/code-size table (Docker, fr_math-style): `make docker-sizes``build/docker_size_table.md` (see `docker/README.md`)
24-
- MCU compare benchmark (needs **`make compare-deps`**): **`examples/lilygo_t_display_s3_bench/`** (`pio run -t upload -t monitor`) or **`examples/esp32s3_benchmark/`** (`idf.py`).
25-
- Silicon snapshot: **`make mcu-benchmark-snapshot`****`compare/MCU_BENCHMARK_SNAPSHOT.md`** (**pio**, **pyserial**, USB).
26+
- MCU compare benchmark (needs **`make compare-deps`**): **`examples/lilygo_t_display_s3_bench/`** (`pio run -t upload -t monitor`), **`examples/esp32s3_benchmark/`** (`idf.py`), or **`examples/pico2_benchmark/`** (Arduino IDE / `arduino-cli`).
27+
- Silicon snapshot: **`make mcu-benchmark-snapshot`****`compare/MCU_BENCHMARK_SNAPSHOT*.md`** (**pio** / Arduino, **pyserial**, USB).
2628

2729
## Editing rules
2830

@@ -38,4 +40,4 @@ Guidance for automated coding agents editing this repository.
3840

3941
## Markdown policy
4042

41-
Root `README.md` is canonical user-facing. **`compare/*.md`** holds methodology matrices; **`compare/BENCHMARK_REPORT.md`** is the tooling-generated snapshot (`make compare-github-report`)—refresh it after materially changing numerical behavior if you want GitHub viewers to see fresh tables.
43+
Root `README.md` is canonical user-facing. **`docs/`** holds Markdown documentation (algorithms, API, fr_math, integration). **`pages/`** holds the GitHub Pages HTML site. **`compare/*.md`** holds methodology matrices; **`compare/BENCHMARK_REPORT.md`** is the tooling-generated snapshot (`make compare-github-report`)—refresh it after materially changing numerical behavior if you want GitHub viewers to see fresh tables.

0 commit comments

Comments
 (0)