Ubuntu 14.04.1 LTS
How do I set the default scale for the bc calculator? Each time I run bc I want scale=2 to be the default, I want to limit all calculations to 2 decimal places. I made a file in my home dir called
.bc and inside it I put
scale=2 on the first line followed by a carriage return.
Permissions on ~/.bc are:
-rw-rw-rw-. Is that right?
Then I did
set BC_ENV_ARGS=~/.bc; export BC_ENV_ARGS. Then I ran bc, did a test like 8.37843*32.190233, and still got more than 2 decimal places.
The online manual did not provide any examples on doing this, so please don't direct me to there.
EDIT: Ok when I do a test like 78/31 it gives me 2 decimals. But when I do my test above, it gives me more than 2 decimals. Why is that? I always want to show only 2 decimals.