dc
all
An arbitrary precision calculator. Uses reverse polish notation (RPN). See also: `bc`, `qalc`.
More info →Options (1)
-e, --expressionbooleanCalculate an expression with the specified scale
Example:
dc {{[-e|--expression]}} '{{10}} k {{5 3 /}} p'Examples (6)
Start an interactive session
Execute a script
dc path/to/script.dcCalculate an expression with the specified scale
dc [-e|--expression] '10 k 5 3 / p'Calculate 4 times 5 (4 5 *), subtract 17 (17 -), and [p]rint the output
dc [-e|--expression] '4 5 * 17 - p'Specify the number of decimal places to 7 (7 k), calculate 5 divided by -3 (5 _3 /) and [p]rint
dc [-e|--expression] '7 k 5 _3 / p'made by @shridhargupta | data from tldr-pages