Arbitrary-precision unit-aware calculator with complex numbers, D&D dice rolls, and comprehensive unit conversions
fend is a command-line calculator that performs arbitrary-precision arithmetic using rational numbers while tracking units throughout calculations. It supports comprehensive unit conversions across SI, US customary, UK customary, and historical unit systems, allowing conversions like '5'10" to cm' or '100 C to F'. The calculator handles complex numbers natively and includes trigonometric functions for mathematical computations.
Beyond standard calculations, fend includes D&D-style dice rolling functionality with commands like 'roll d20' or 'roll 4d6'. It supports multiple number bases from binary to base-36, variables for storing values, and lambda calculus operations. The tool provides an interactive REPL interface with Emacs-style CLI shortcuts for efficient command-line usage.
fend targets developers, engineers, students, and anyone requiring precise calculations with unit awareness. It's available as both a CLI tool and web interface, with packages distributed across major package managers including Homebrew, Cargo, and various Linux distributions. The tool also offers WebAssembly bindings for integration into web applications and a Telegram bot interface.
# via Homebrew
brew install fend
# via Cargo
cargo install fend
# via Windows Package Manager
winget install fend