Q:

irritating: bc float expression leads to integer result

I have been happily using bc for a few weeks. Now I need to do some simple calculations like 1.0+27.0/37.0*5.0, which bc in interactive mode calculates as integer result. I tried this on two different linux boxes. Same result: 1 instead of 4.67...
Can you suggest an explanation?

A:

Are you really using bc for several weeks? By default bc computes on integer numbers. You may change it either by typing first:
scale=8

(or whatever number of digits you need).
Or by launching bc with:   bc -l which is often the most convenient way since it also loads some scientific functions.

