Arbitrary-precision calculator with unit conversions, complex numbers, and D&D dice rolls
fend is a command-line calculator that performs arbitrary-precision arithmetic using rational numbers. Unlike standard calculators, it maintains full precision for all calculations and includes comprehensive unit conversion support covering SI, US customary, UK customary, and historical units. The tool handles complex number operations, trigonometric functions, and supports number bases from binary to base-36.
The calculator includes several distinctive features for different use cases. It can perform D&D-style dice rolls with commands like 'roll 4d6', supports variable assignment for reusing calculated values, and provides lambda calculus functionality. The CLI uses Emacs-style shortcuts for navigation and editing.
fend targets users who need precise calculations with unit awareness, from engineers and scientists requiring exact arithmetic to gamers needing dice roll functionality. It runs as a REPL session where users can perform calculations like '5'10" to cm' for unit conversions or '100 C to F' for temperature conversions. The tool is also available as a web interface and can be integrated into other applications through WebAssembly packages.
# via Homebrew
brew install fend
# via Cargo
cargo install fend
# via Winget
winget install fend