bc ( en )

Last modification : 2013/01/26 19:16

bc is an alternative to the expr arithmetics expressions evaluator.
Here are the operators and functions available into bc:
msh> msh:bc \"help()\"
Operators: , / * %, + -, < > <= >=, == !=, & |, && ||
Known functions: a, abs, acos, acosh, asin, asinh, atan, atanh, bin, c, cbr, cbrt,
 ceil, comp, cos, cosh, cotan, deg2rad, exp, fact, floor, help, hex, int, inv,
 ln, log, not, oct, pi, rad2deg, rand, sgn, sin, sinh, sqr, sqrt, tan, tanh, time


Example:
msh> A=2
msh> A = msh:bc( \"2*$A+10\" )
msh> print $A
14