Skip to main content

An arbitrary precision calculator language.

# To start an interactive session:
bc

# To start an interactive session with the standard math library enabled:
bc --mathlib

# To calculate an expression:
echo '5 / 3' | bc

# To execute a script:
bc <path/to/script.bc>

# To calculate an expression with the specified scale:
echo 'scale = 10; 5 / 3' | bc

# To calculate a sine/cosine/arctangent/natural logarithm/exponential function using 'mathlib':
echo 's|c|a|l|e(1)' | bc --mathlib