Answers:
安装bc
很简单:
sudo apt-get install bc
至于扩展,man bc
说:
DIFFERENCES
This version of bc was implemented from the POSIX P1003.2/D11 draft and
contains several differences and extensions relative to the draft and
traditional implementations.
实际上,手册页中充满了标记为“扩展”的内容。
使用以下-l
选项应用数学扩展:
-l, --mathlib
Define the standard math library.
从而:
$ bc <<<'c(10)'
Runtime error (func=(main), adr=6): Function c not defined.
$ bc -l <<<'c(10)'
-.83907152907645245225