Skip to content

idealvin/bc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

some useful math functions for linux calculator bc

usage

Put bcrc somewhere such as ~/.bcrc, then start bc as follows:

# you may add an alias to your bashrc file:
#   alias bc='bc ~/.bcrc -l -q'
bc ~/.bcrc -l

supported functions

trigonometric functions

sin(x), cos(x), tan(x), cot(x), sec(x), csc(x)

inverse trigonometric functions

arcsin(x), arccos(x), arctan(x), arccot(x), arcsec(x), arccsc(x)

or asin(x), acos(x), atan(x), acot(x), asec(x), acsc(x)

logarithmic function

log(a, b)
ln(x)            # log(e, x)
lg(x), log10(x)  # log(10, x)
log2(x)          # log(2, x)

others

e(x), exp(x)     # exponentiation of e
pow(a, b)        # a ^ b
sqrt(x)          # x ^ 1/2
cbrt(x)          # x ^ 1/3
abs(x)           # absolute value of x
fac(n)           # factorial of n
c(n, k)          # n choose k, unordered
a(n, k)          # n choose k, ordered
deg(rad)         # Radians to degrees
rad(deg)         # Degrees to radians

About

some useful math functions for linux calculator bc

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •