bc, dc: refresh page (#7670)

This commit is contained in:
Emily Grace Seville
2022-01-21 22:00:09 -08:00
committed by GitHub
parent 3e05eed5b0
commit 47445dd786
3 changed files with 61 additions and 18 deletions

29
pages/osx/bc.md Normal file
View File

@@ -0,0 +1,29 @@
# bc
> An arbitrary precision calculator language.
> See also: `dc`.
> More information: <https://manned.org/man/freebsd-13.0/bc.1>.
- Start an interactive session:
`bc`
- Start an interactive session with the standard math library enabled:
`bc --mathlib`
- Calculate an expression:
`bc --expression='{{5 / 3}}'`
- Execute a script:
`bc {{path/to/script.bc}}`
- Calculate an expression with the specified scale:
`bc --expression='scale = {{10}}; {{5 / 3}}'`
- Calculate a sine/cosine/arctangent/natural logarithm/exponential function using `mathlib`:
`bc --mathlib --expression='{{s|c|a|l|e}}({{1}})'`