Can someone confirm observed bug for "bc" ? scale=0 has no effect!

When I try

fval=1.40 ; echo "scale=0 ; 1000 * ${fval}" | bc

I get the result

1400.00

With my specified value for scale, I expect no decimal points.

Anyone else have this issue?

Version: bc 1.07.1

----- edit -----
Also posted on "Ask Ubuntu".

There are issues with scale=0 in bc so the simple solution is to divide by 1

fval=1.40 ; echo "scale=0 ; 1000 * ${fval} / 1 " | bc
1400
4 Likes