Note: You are viewing an old revision of this page. View the current version.

Notes for the bc(1) arbitrary precision calculator

Handy Variables

scale - scale defines how some operations use digits after the decimal point . (Default 0) So if you type 5/5 bc interprets this as 5.00000/5.00000. and the answer is 1.00000

last - is a variable that has the value of the last printed number. So if you have a running total in bc of 100, then last+10 would result in 110.