hc: An Algebraic Calculator Copyright 2010-2025, Brian Johnson
This is my attempt to write something that bridges the gap between a simple calculator and a full-fledged computer algebra system. "bc" and "dc" are extant command-line calculators with various features, hence "hc". hc is written in Haskell, and one of its design goals is to demonstrate that Haskell is practical as a language for medium-size projects.
BUILD INSTRUCTIONS
- Install ghcup
- make
FEATURES
- Exact integer and rational number arithmetic
- Addition, subtraction, multiplication, division of integers and variables
- Raising to integer powers
- Various simplifications are performed
- expand() multiplies out products/powers of sums
- factor() can compute the square free factorization of a polynomial
- Assignment to variables with :=
- Input with command line editing, history, and tab completion