Terminal calculator
A simple command line calculator.
Purpose
The binary name is tc.
If you are already in a terminal session and need a quick calculation,
typing tc "2.5 + 3.73 / 4" is actually faster than grabbing
your desktop calculator or starting and using a calculator app.
tc is also a lot simpler to use than bc or dc.
Manual
The manual states quite everything you need to know about tc.
(and it'll take you about one minute to read)
Examples
Expressions on the command line
) =
) =
) =
Interactive session

Clear diagnostics
)
Grammar reference
See Grammar.ebnf
Installation
Several methods are supported. If you are a rust developer, you can use cargo directly:
This will install the program tc on all supported platforms.
| Method | Platform | How-To |
|---|---|---|
| Cargo | All | cargo install termcalc |
| Snap | Linux | sudo snap install termcalc |
Other methods: work in progress
Linux specific case
On Linux, tc is a kernel system utility (Traffic Control).
Snap and distribution packages will install a binary named termcalc.
If you don't use the system tc, you are encouraged to create
a tc alias to termcalc like so:
If it doesn't work, uncomment or append the following to ~/.bashrc
if [; then
fi