bc
An arbitrary precision calculator language.
See also: `dc`.
- Start an interactive session:
bc
- Start an interactive session with the standard math library enabled:
bc --mathlib
echo '{5 / 3}' | bc
bc {path/to/script.bc}
- Calculate an expression with the specified scale:
echo 'scale = {10}; {5 / 3}' | bc
- Calculate a sine/cosine/arctangent/natural logarithm/exponential function using `mathlib`:
echo '{s|c|a|l|e}({1})' | bc --mathlib
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).