Playing around with bc for fun and noticed this.
Can anyone explain why the result changes?
$ printf "scale=6; 8400 * (1/32)\n" | bc
262.500000
$ printf "scale=5; 8400 * (1/32)\n" | bc
262.50000
$ printf "scale=4; 8400 * (1/32)\n" | bc
262.0800
$ printf "scale=3; 8400 * (1/32)\n" | bc
260.400
$ printf "scale=2; 8400 * (1/32)\n" | bc
252.00
$ printf "scale=1; 8400 * (1/32)\n" | bc
0
To my understanding, `scale' should only affect the decimals after the separator, but it seems like it changes the way it calculates it?
Also, shouldn't `scale=1' be 252 (or something in that neighbourhood)?
Checking online, I don't find anything that explains this.
It's the same if I invoke bc directly and not piping into it.