mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-19 07:01:32 +00:00
Update cheatsheets
This commit is contained in:
34
osx/bc
Normal file
34
osx/bc
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, osx]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# bc
|
||||
|
||||
> An arbitrary precision calculator language.
|
||||
> See also: `dc`.
|
||||
> More information: <https://keith.github.io/xcode-man-pages/bc.1.html>.
|
||||
|
||||
- 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}})'`
|
||||
Reference in New Issue
Block a user