gralculator/internal/calc
Grok a3ed82c6d9 feat(engine): implement core calculation engine (phase 2)
- float64 decimal math + classic entry buffer (in-progress digits visible)
- CycleBase() with IsInteger() (epsilon) + ErrConversionNotPossible (CERR)
- FormatForDisplay() for DEC/HEX/BIN/OCT (integer formatting for non-DEC)
- Basic ops: + - * / and MOD (math.Mod)
- Equals, SetOperator, EnterDigit/DecimalPoint, ClearEntry, AllClear, ChangeSign, Backspace
- Comprehensive tests covering the critical CERR path (23/6, 1/3 + BASE) plus arithmetic and MOD

This completes the pure engine. The engine is now usable by the upcoming TUI spike. Paper trail updated.
2026-06-06 14:29:36 +01:00
..
calc_test.go feat(engine): implement core calculation engine (phase 2) 2026-06-06 14:29:36 +01:00
calc.go feat(engine): implement core calculation engine (phase 2) 2026-06-06 14:29:36 +01:00