I’ve encountered an error, probably a bug in bc. I encountered it when trying to compare two numbers on a script in bash. It turns out that when I do:
echo "1.1E-2<1.1E-1" | bc -l
It returns 1 (as expected).
But when I do this for exmaple:
echo "2.1E-2<1.1E-1" | bc -l
It returns 0, when it should return 1 (because 0.021 is smaller than 0.11).
I’m using bc version 1.06.95 with kubuntu 14.04
Has anyone found a similar result? Can anyone think of a workaround?