whitek 发表于 2018-8-25 11:04:15

shell浮点运算工具bc

  shell浮点运算工具bc
  bc支持浮点数,是一个用于数学运算的高级工具。
  # bc
  bc 1.06
  Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
  This is free software with ABSOLUTELY NO WARRANTY.
  For details type `warranty'.
  2+3
  5
  3.5*2.3
  8.0
  Ctrl+d 退出
  当然bc还支持很多运算符,比如/ * - +。还支持变量,条件比较操作符,逻辑操作符,判断语句和循环语句。
  a=1
  while(a++
页: [1]
查看完整版本: shell浮点运算工具bc