Calculator REPL with syntax highlighting and persistent history, similar to bc(1)
eva is a calculator REPL (Read-Eval-Print Loop) that functions as an interactive command-line calculator similar to bc(1). It supports standard arithmetic operations, trigonometric functions, logarithms, and mathematical constants like pi and e. The tool accepts expressions in a natural mathematical syntax and evaluates them immediately.
The calculator includes several quality-of-life features that differentiate it from basic calculators. It automatically inserts multiplication operators where implied (e.g., 12sin(45) becomes 12 * sin(45)), balances parentheses automatically, and allows referencing the previous result using _. All trigonometric functions expect input in degrees by default, though radian mode is available via command-line flag.
eva provides syntax highlighting for mathematical expressions and maintains persistent history across sessions. It can operate in both interactive REPL mode and command mode for one-off calculations. The tool supports configurable output formatting including different number bases (radix 1-36) and decimal precision (1-64 places). Error handling includes domain error detection for invalid mathematical operations like logarithms of negative numbers.
# via Homebrew
brew install eva
# via Cargo
cargo install eva
