{"id":514,"date":"2025-01-17T07:18:12","date_gmt":"2025-01-16T23:18:12","guid":{"rendered":"http:\/\/sqtcw.cn\/?p=514"},"modified":"2025-01-17T07:18:12","modified_gmt":"2025-01-16T23:18:12","slug":"python-%e6%95%b0%e5%ad%a6%e8%bf%90%e7%ae%97%e6%a0%87%e5%87%86%e5%ba%93math-%e6%a8%a1%e5%9d%97%e7%9a%84%e5%b8%b8%e8%a7%81%e7%94%a8%e9%80%94","status":"publish","type":"post","link":"http:\/\/www.cnitw.com\/?p=514","title":{"rendered":"Python \u6570\u5b66\u8fd0\u7b97\u6807\u51c6\u5e93math \u6a21\u5757\u7684\u5e38\u89c1\u7528\u9014"},"content":{"rendered":"\n<p><code>math<\/code> \u6a21\u5757\u662f Python \u6807\u51c6\u5e93\u4e2d\u7684\u4e00\u4e2a\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u4e0e\u6570\u5b66\u8fd0\u7b97\u76f8\u5173\u7684\u51fd\u6570\u548c\u5e38\u91cf\u3002<\/p>\n\n\n\n<p>\u4e00\u4e9b\u5e38\u89c1\u7684\u7528\u9014\u5305\u62ec\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u57fa\u672c\u6570\u5b66\u8fd0\u7b97\uff1a\u5982 <code>math.sqrt()<\/code> \u7528\u4e8e\u8ba1\u7b97\u5e73\u65b9\u6839\uff0c<code>math.pow()<\/code> \u7528\u4e8e\u8fdb\u884c\u5e42\u8fd0\u7b97\u3002<\/li>\n\n\n\n<li>\u4e09\u89d2\u51fd\u6570\uff1a\u5982 <code>math.sin()<\/code> \u3001<code>math.cos()<\/code> \u3001<code>math.tan()<\/code> \u7b49\u3002<\/li>\n\n\n\n<li>\u6307\u6570\u548c\u5bf9\u6570\u51fd\u6570\uff1a<code>math.exp()<\/code> \u8ba1\u7b97\u6307\u6570\uff0c<code>math.log()<\/code> \u8ba1\u7b97\u81ea\u7136\u5bf9\u6570\u7b49\u3002<\/li>\n\n\n\n<li>\u53d6\u6574\u548c\u820d\u5165\u51fd\u6570\uff1a\u9664\u4e86\u524d\u9762\u63d0\u5230\u7684 <code>math.floor()<\/code> \u5411\u4e0b\u53d6\u6574\uff0c\u8fd8\u6709 <code>math.ceil()<\/code> \u5411\u4e0a\u53d6\u6574\uff0c<code>math.trunc()<\/code> \u622a\u53d6\u6574\u6570\u90e8\u5206\u7b49\u3002<\/li>\n\n\n\n<li>\u6570\u5b66\u5e38\u91cf\uff1a\u5982 <code>math.pi<\/code> \uff08\u5706\u5468\u7387\uff09\u3001<code>math.e<\/code> \uff08\u81ea\u7136\u5e38\u6570\uff09\u7b49\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u603b\u7684\u6765\u8bf4\uff0c<code>math<\/code> \u6a21\u5757\u4e3a\u5904\u7406\u5404\u79cd\u6570\u5b66\u8ba1\u7b97\u63d0\u4f9b\u4e86\u65b9\u4fbf\u548c\u51c6\u786e\u7684\u65b9\u6cd5\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u9664\u4e86 Python \u6807\u51c6\u5e93\u4e2d\u7684 <code>math<\/code> \u6a21\u5757\uff0c\u8fd8\u6709\u4e00\u4e9b\u5e38\u7528\u7684\u7b2c\u4e09\u65b9\u6570\u5b66\u8fd0\u7b97\u5e93\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>NumPy<\/code>\uff1a\u7528\u4e8e\u5904\u7406\u5927\u578b\u591a\u7ef4\u6570\u7ec4\u548c\u77e9\u9635\u8fd0\u7b97\uff0c\u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u6570\u5b66\u51fd\u6570\u548c\u7ebf\u6027\u4ee3\u6570\u64cd\u4f5c\u3002<\/li>\n\n\n\n<li><code>SciPy<\/code>\uff1a\u5efa\u7acb\u5728 <code>NumPy<\/code> \u57fa\u7840\u4e0a\uff0c\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u79d1\u5b66\u8ba1\u7b97\u548c\u6570\u5b66\u7b97\u6cd5\uff0c\u5982\u4f18\u5316\u3001\u79ef\u5206\u3001\u63d2\u503c\u7b49\u3002<\/li>\n\n\n\n<li><code>SymPy<\/code>\uff1a\u7528\u4e8e\u7b26\u53f7\u6570\u5b66\u8ba1\u7b97\uff0c\u80fd\u591f\u8fdb\u884c\u516c\u5f0f\u63a8\u5bfc\u3001\u89e3\u65b9\u7a0b\u7b49\u3002<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>math \u6a21\u5757\u662f Python \u6807\u51c6\u5e93\u4e2d\u7684\u4e00\u4e2a\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u4e0e\u6570\u5b66\u8fd0\u7b97\u76f8\u5173\u7684\u51fd\u6570\u548c\u5e38\u91cf\u3002 \u4e00\u4e9b\u5e38\u89c1\u7684\u7528\u9014\u5305\u62ec\uff1a \u603b\u7684\u6765\u8bf4\uff0cmath \u6a21\u5757\u4e3a\u5904\u7406\u5404\u79cd\u6570\u5b66\u8ba1\u7b97\u63d0\u4f9b\u4e86\u65b9\u4fbf\u548c\u51c6\u786e\u7684\u65b9\u6cd5\u3002 \u9664\u4e86 Python \u6807\u51c6\u5e93\u4e2d\u7684 math \u6a21\u5757\uff0c\u8fd8\u6709\u4e00\u4e9b\u5e38\u7528\u7684\u7b2c\u4e09\u65b9\u6570\u5b66\u8fd0\u7b97\u5e93\uff0c\u4f8b\u5982\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-514","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/posts\/514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=514"}],"version-history":[{"count":0,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=\/wp\/v2\/posts\/514\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cnitw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}