choroba
bc
doesn't understand exponential notation.
It probably interprets "E" as a hex digit, but in longer numbers, it seems to translate it to 9 (bug?), and similarly for other hex digits:
bc -l <<< E-4 # 14 - 4 10 bc -l <<< 1E-1 # 19 - 1 18 bc -l <<< F.4E2 9.492
Hastur
Your workaround
echo "2.1*10^-2<1.1*10^-1" | bc -l
If the case you want to transform the output of another file you can do something similar to
echo "2.1E-2<1.1E-1" | sed 's/E/*10^/g' | bc -l
where with sed
you go to substitute E
with *10^
that is accepted by bc