tldr/pages/common/bc.md

20 lines
292 B
Markdown
Raw Normal View History

2015-12-12 20:37:45 +00:00
# bc
> Calculator.
- Run calculator in interactive mode:
2015-12-12 20:37:45 +00:00
`bc -i`
- Calculate the result of an expression:
2015-12-12 20:37:45 +00:00
`bc <<< "(1 + 2) * 2 ^ 2"`
- Calculate with the given precision:
2015-12-12 20:37:45 +00:00
`bc <<< "scale=10; 5 / 3"`
- Calculate expression with sine and cosine using mathlib:
2015-12-12 20:37:45 +00:00
`bc -l <<< "s(1) + c(1)"`