{"id":1584,"date":"2019-04-28T23:30:14","date_gmt":"2019-04-28T15:30:14","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=1584"},"modified":"2024-01-23T21:57:29","modified_gmt":"2024-01-23T13:57:29","slug":"bc","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/bc","title":{"rendered":"bc\u547d\u4ee4 &#8211; \u6570\u5b57\u8ba1\u7b97\u5668"},"content":{"rendered":"\n<p>bc\u547d\u4ee4\u6765\u81ea\u82f1\u6587\u8bcd\u7ec4binary calculator\u7684\u7f29\u5199\uff0c\u4e2d\u6587\u8bd1\u4e3a\u201c\u4e8c\u8fdb\u5236\u8ba1\u7b97\u5668\u201d\uff0c\u5176\u529f\u80fd\u662f\u8fdb\u884c\u6570\u5b57\u8ba1\u7b97\u3002bash\u89e3\u91ca\u5668\u4ec5\u80fd\u8fdb\u884c\u6574\u6570\u8ba1\u7b97\uff0c\u800c\u4e0d\u652f\u6301\u6d6e\u70b9\u6570\u8ba1\u7b97\uff0c\u56e0\u6b64\u6709\u65f6\u8981\u7528\u5230bc\u547d\u4ee4\u8fdb\u884c\u9ad8\u7cbe\u5ea6\u7684\u6570\u5b57\u8ba1\u7b97\u5de5\u4f5c\u3002<\/p>\n\n\n\n<p><strong>\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>bc \u53c2\u6570<\/p>\n\n\n\n<p><strong>\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>-i<\/td><td>\u4f7f\u7528\u4ea4\u4e92\u6a21\u5f0f<\/td><td rowspan=\"3\">&nbsp;<\/td><td>-s<\/td><td>\u7cbe\u51c6\u5904\u7406POSIX bc\u8bed\u8a00<\/td><\/tr><tr><td>-l<\/td><td>\u8bbe\u7f6e\u6807\u51c6\u6570\u5b66\u5e93<\/td><td>--help<\/td><td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f<\/td><\/tr><tr><td>-q<\/td><td>\u663e\u793a\u6b63\u5e38\u7684GNU bc\u73af\u5883\u4fe1\u606f<\/td><td>--version<\/td><td>\u663e\u793a\u7248\u672c\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u53c2\u8003\u793a\u4f8b<\/strong><\/p>\n\n\n\n<p>\u8ba1\u7b97\u5f97\u51fa\u6307\u5b9a\u7684\u6d6e\u70b9\u6570\u4e58\u6cd5\u7ed3\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# bc \r\n1.2345*3 \r\n3.7035 \r<\/pre>\n\n\n\n<p>\u8bbe\u5b9a\u8ba1\u7b97\u7cbe\u5ea6\u4e3a\u5c0f\u6570\u70b9\u540e3\u4f4d\uff0c\u53d6\u6d6e\u70b9\u6570\u9664\u6cd5\u7ed3\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# bc \r\nscale=3 \r\n3\/8 \r\n.375 \r<\/pre>\n\n\n\n<p>\u5206\u522b\u8ba1\u7b97\u6574\u6570\u7684\u5e73\u65b9\u4e0e\u5e73\u65b9\u6839\u7ed3\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# bc \r\n10^10 \r\n10000000000 \r\nsqrt(100) \r\n10.000\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>bc\u547d\u4ee4\u6765\u81ea\u82f1\u6587\u8bcd\u7ec4binary calculator\u7684\u7f29\u5199\uff0c\u4e2d\u6587\u8bd1\u4e3a\u201c\u4e8c\u8fdb\u5236\u8ba1\u7b97\u5668\u201d\uff0c\u5176\u529f\u80fd\u662f\u8fdb\u884c\u6570\u5b57\u8ba1\u7b97\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-1584","post","type-post","status-publish","format-standard","hentry","category-other"],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=1584"}],"version-history":[{"count":14,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1584\/revisions"}],"predecessor-version":[{"id":17318,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1584\/revisions\/17318"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=1584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=1584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=1584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}