How heldercorreia/speedcrunch works
SpeedCrunch is a high-precision scientific calculator. Its principal workflow is keyboard entry of an expression, evaluation to a quantity, and display of formatted results; sessions also preserve history and user-defined symbols. The README documents syntax highlighting, completion, a formula book, and constant insertion, which are represented as product capabilities. The sampled source supports the editor–session–evaluator and numeric representation layers; GUI wiring beyond those excerpts is not asserted.
Main entry points: evaluator.cpp Expression evaluator · editor.cpp Expression editor · main.cpp Application startup · session.cpp Session state
Components 22
Calculator interface
- Application startup
src/main.cpp - Expression editor
src/gui/editor.cpp - Syntax highlighting
src/gui/syntaxhighlighter.cpp - Scrollable results
src/gui/resultdisplay.cpp - Keyboard keypad
src/gui/keypad.cpp - Main window
src/gui/mainwindow.h
Evaluation and sessions
- Session state
src/core/session.cpp - Evaluation history
src/core/sessionhistory.cpp - Expression evaluator
src/core/evaluator.cpp - Symbol context
src/core/symbolcontext.h - Built-in functions
src/core/functions.cpp - Units system
src/core/units.cpp - Preferences
src/core/settings.cpp
Numeric engine
- Quantities
src/math/quantity.cpp - Complex arithmetic
src/math/cmath.cpp - High precision math
src/math/hmath.cpp - Floating-point core
src/math/floatnum
Calculator features
- Auto-completion
src/gui/editor.cpp - Formula book
src/core/book.cpp - Constants insertion
src/gui/constantswidget.cpp - Help manual
src/gui/manualwindow.cpp
Other components
- Calculator user
Connections 22
- Calculator user → Application startup: starts
- Application startup → Main window: creates
src/main.cpp - Calculator user → Expression editor: enters expressions
- Expression editor → Session state: uses session
src/gui/editor.cpp - Expression editor → Syntax highlighting: creates highlighter
src/gui/editor.cpp - Expression editor → Expression evaluator: gets evaluator
src/gui/editor.cpp - Session state → Expression evaluator: owns evaluator
src/core/session.cpp - Session state → Evaluation history: stores history
src/core/session.cpp - Expression evaluator → Symbol context: uses symbol context
- Expression evaluator → Built-in functions: uses functions
- Expression evaluator → Units system: uses user units
- Expression evaluator → Quantities: produces quantities
- Quantities → Complex arithmetic: uses complex numbers
- Quantities → High precision math: uses high precision
- High precision math → Floating-point core: uses numeric core
src/math/hmath.cpp - Calculator user → Keyboard keypad: uses keyboard input
- Calculator user → Scrollable results: views results
- Calculator user → Auto-completion: uses completion
- Calculator user → Formula book: uses formula book
- Calculator user → Constants insertion: inserts constants
- Calculator user → Help manual: consults manual
- Application startup → Preferences: loads preferences
src/main.cpp