Calculator REPL with syntax highlighting and persistent history, similar to bc(1)
eva is a calculator REPL (Read-Eval-Print Loop) that provides an interactive command-line interface for mathematical calculations. It serves as an alternative to bc(1) with additional features like syntax highlighting and persistent history. The tool supports standard mathematical operations, trigonometric functions, logarithms, and common mathematical constants like pi and e.
The calculator includes quality-of-life features that enhance the user experience beyond basic computation. It automatically inserts multiplication operators where implied (e.g., 12sin(45) becomes 12 * sin(45)), automatically balances parentheses, and allows referencing the previous answer with _. Users can customize output formatting with options for different number bases (radix 1-36) and decimal precision (1-64 places).
eva supports both interactive REPL mode and command-line expression evaluation. It includes comprehensive mathematical functions covering trigonometry (with degree input by default), logarithms, roots, and basic operations. The tool provides clear error messages for domain errors and maintains calculation history across sessions, making it suitable for developers, engineers, and anyone needing quick mathematical computations in a terminal environment.
# via Homebrew
brew install eva
# via Cargo
cargo install eva
