bc: edit page (#13308)

Co-authored-by: spageektti <git@spageektti.cc>
pull/28/head
Fazle Arefin 2024-07-27 04:53:43 +10:00 committed by GitHub
parent 5cb0cfb3c9
commit fc696fb41a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 3 deletions

View File

@ -1,16 +1,16 @@
# bc
> An arbitrary precision calculator language.
> See also: `dc`.
> See also: `dc`, `qalc`.
> More information: <https://manned.org/bc.1>.
- Start an interactive session:
`bc`
- Start an interactive session with the standard math library enabled:
- Start an [i]nteractive session with the standard math [l]ibrary enabled:
`bc --mathlib`
`bc --interactive --mathlib`
- Calculate an expression:
@ -27,3 +27,7 @@
- Calculate a sine/cosine/arctangent/natural logarithm/exponential function using `mathlib`:
`echo '{{s|c|a|l|e}}({{1}})' | bc --mathlib`
- Execute an inline factorial script:
`echo "define factorial(n) { if (n <= 1) return 1; return n*factorial(n-1); }; factorial({{10}})" | bc`