开发者社区 问答 正文

求解釋這個命令 time echo "scale=5000; 4*a(1)" | bc -l -q

霍鉅的文章提到提到:

..., 用计算圆周率的办法来测试cpu性能:
time echo "scale=5000; 4*a(1)" | bc -l -q
过了4,5分钟都没算出来结果。基本可以定位问题在CPU上。
沒看懂這個命令,求解釋一下

展开
收起
a123456678 2016-06-17 17:49:47 6039 分享 版权
1 条回答
写回答
取消 提交回答
  • ● man bc
    a (x)  The arctangent of x, arctangent returns radians.
    ● bc --help
    usage: bc [options] [file ...]
      -h  --help         print this usage and exit
      -i  --interactive  force interactive mode
      -l  --mathlib      use the predefined math routines
      -q  --quiet        don't print initial banner
      -s  --standard     non-standard bc constructs are errors
      -w  --warn         warn about non-standard bc constructs
      -v  --version      print version information and exit
    2019-07-17 19:43:21
    赞同 展开评论
问答分类:
C#
问答地址: