linux 命令终端计算除法

linux 命令终端计算除法

  • 先通过bc,开启计算模式;
  • scale 设置除法精确度
zb@zb-computer:/$ bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 

scale=10
1/3
.3333333333

720/1920
.3750000000

0.375/2
.1875000000

1-0.375
.625
上一篇:2021-07-12


下一篇:免杀学习——C++(一)