請問文字界面的計算機 - Linux

Table of Contents

※ 引述《OBOBOB (無奈 )》之銘言:
: 問的是bc
: 有沒有辦法輸入和輸出科學記號
: 比如說一個文字檔案list:
: 1.234E+03 * -2.345E-02
: bc < list
: 然後輸出是
: -2.8937E+01


I don't know how to use bc. So, I assume
bc < list
will print the result
-28.937

Then, you can format the number using
cat list | bc | xargs printf '%e\n'

--

All Comments