How to get bc to handle numbers in scientific (aka exponential) notation?
问题 bc doesn't like numbers expressed in scientific notation (aka exponential notation). $ echo "3.1e1*2" | bc -l (standard_in) 1: parse error but I need to use it to handle a few records that are expressed in this notation. Is there a way to get bc to understand exponential notation? If not, what can I do to translate them into a format that bc will understand? 回答1: Unfortunately, bc doesn't support scientific notation. However, it can be translated into a format that bc can handle, using