feat(math): exact evaluation of handwritten expressions (Issue #46, stage 1)

New module math.rs: solve() reads a recognised expression such as 2^4,
2,5 · 3 or (x + 3)² and returns its result as text (16, 7,5,
x² + 6x + 9). Own parser with exact fractions and polynomial expansion
instead of evalexpr, as implicit multiplication and expanding need it
anyway. Not used by the UI yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
haraldandClaude Opus 5.5 committed 2026-10-28 12:34:32 +01:00
1 parent 8af10fe542
commit cd490dd9a7
4 files changed
+659

No files matched your search

+1
View File
@@ -193,6 +193,7 @@ src/
├── storage.rs # Loading/saving (atomic), notebooks, trash, storage location
├── disk_watch.rs # Taking over changes from other devices (sync clients)
├── library.rs # Notebook folders (library.json)
├── math.rs # Exact evaluation of handwritten math (Issue #46)
├── autosave.rs # Saving in the background
├── export.rs # PDF export
├── page_export.rs # Page as PNG/SVG, selection as image