{"id":188444,"date":"2024-11-11T22:46:24","date_gmt":"2024-11-11T14:46:24","guid":{"rendered":"https:\/\/server.hk\/cnblog\/188444\/"},"modified":"2024-11-11T22:46:26","modified_gmt":"2024-11-11T14:46:26","slug":"%e6%8e%a2%e7%a9%b6%e6%95%b8%e6%93%9a%e5%ba%abfloat%e7%9a%84%e6%9b%b4%e5%a4%a7%e5%80%bc%e9%99%90%e5%88%b6%e3%80%82-%e6%95%b8%e6%93%9a%e5%ba%abfloat%e6%9b%b4%e5%a4%a7%e5%80%bc","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/188444\/","title":{"rendered":"\u63a2\u7a76\u6578\u64da\u5eabFloat\u7684\u66f4\u5927\u503c\u9650\u5236\u3002 (\u6578\u64da\u5eabfloat\u66f4\u5927\u503c)"},"content":{"rendered":"<h1 id=\"%e6%8e%a2%e7%a9%b6%e6%95%b8%e6%93%9a%e5%ba%abfloat%e7%9a%84%e6%9b%b4%e5%a4%a7%e5%80%bc%e9%99%90%e5%88%b6-oIHMSrRrUn\">\u63a2\u7a76\u6578\u64da\u5eabFloat\u7684\u66f4\u5927\u503c\u9650\u5236<\/h1>\n<p>\u5728\u6578\u64da\u5eab\u8a2d\u8a08\u4e2d\uff0c\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u985e\u578b\u5c0d\u65bc\u6578\u64da\u7684\u5b58\u5132\u548c\u8655\u7406\u81f3\u95dc\u91cd\u8981\u3002Float\u985e\u578b\u662f\u4e00\u7a2e\u5e38\u7528\u7684\u6578\u64da\u985e\u578b\uff0c\u7279\u5225\u662f\u5728\u9700\u8981\u5b58\u5132\u5c0f\u6578\u7684\u60c5\u6cc1\u4e0b\u3002\u7136\u800c\uff0cFloat\u985e\u578b\u7684\u66f4\u5927\u503c\u9650\u5236\u662f\u8a31\u591a\u958b\u767c\u8005\u5728\u8a2d\u8a08\u6578\u64da\u5eab\u6642\u9700\u8981\u8003\u616e\u7684\u91cd\u8981\u56e0\u7d20\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eFloat\u985e\u578b\u7684\u7279\u6027\u3001\u5176\u66f4\u5927\u503c\u9650\u5236\u4ee5\u53ca\u5728\u5be6\u969b\u61c9\u7528\u4e2d\u7684\u8003\u91cf\u3002<\/p>\n<h2 id=\"float%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e6%a6%82%e8%bf%b0-oIHMSrRrUn\">Float\u6578\u64da\u985e\u578b\u6982\u8ff0<\/h2>\n<p>Float\u662f\u4e00\u7a2e\u6d6e\u9ede\u6578\u6578\u64da\u985e\u578b\uff0c\u901a\u5e38\u7528\u65bc\u8868\u793a\u5e36\u6709\u5c0f\u6578\u7684\u6578\u5b57\u3002\u5b83\u7684\u5b58\u5132\u65b9\u5f0f\u57fa\u65bc\u79d1\u5b78\u8a18\u6578\u6cd5\uff0c\u9019\u4f7f\u5f97\u5b83\u80fd\u5920\u8868\u793a\u975e\u5e38\u5927\u7684\u6216\u975e\u5e38\u5c0f\u7684\u6578\u5b57\u3002Float\u985e\u578b\u7684\u7cbe\u5ea6\u901a\u5e38\u662f\u6709\u9650\u7684\uff0c\u9019\u610f\u5473\u8457\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u6578\u5b57\u7684\u8868\u793a\u53ef\u80fd\u6703\u51fa\u73fe\u8aa4\u5dee\u3002<\/p>\n<h2 id=\"float%e7%9a%84%e6%9b%b4%e5%a4%a7%e5%80%bc%e9%99%90%e5%88%b6-oIHMSrRrUn\">Float\u7684\u66f4\u5927\u503c\u9650\u5236<\/h2>\n<p>\u5728\u4e0d\u540c\u7684\u6578\u64da\u5eab\u7cfb\u7d71\u4e2d\uff0cFloat\u985e\u578b\u7684\u66f4\u5927\u503c\u9650\u5236\u53ef\u80fd\u6703\u6709\u6240\u4e0d\u540c\u3002\u4ee5MySQL\u70ba\u4f8b\uff0cFloat\u985e\u578b\u7684\u6700\u5927\u503c\u7d04\u70ba3.402823466E+38\uff0c\u9019\u662f\u6839\u64daIEEE 754\u6a19\u6e96\u4f86\u5b9a\u7fa9\u7684\u3002\u9019\u610f\u5473\u8457\uff0c\u7576\u6578\u5b57\u8d85\u904e\u9019\u500b\u7bc4\u570d\u6642\uff0c\u5c07\u7121\u6cd5\u6b63\u78ba\u5b58\u5132\uff0c\u53ef\u80fd\u6703\u5c0e\u81f4\u6ea2\u51fa\u932f\u8aa4\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u6578\u64da\u5eab\u7cfb\u7d71\u4e2dFloat\u985e\u578b\u7684\u66f4\u5927\u503c\u9650\u5236\uff1a<\/p>\n<ul>\n<li><strong>MySQL:<\/strong> \u6700\u5927\u503c\u7d04\u70ba3.402823466E+38<\/li>\n<li><strong>PostgreSQL:<\/strong> \u6700\u5927\u503c\u7d04\u70ba1.701411734E+38<\/li>\n<li><strong>SQL Server:<\/strong> \u6700\u5927\u503c\u7d04\u70ba1.701411734E+38<\/li>\n<\/ul>\n<h2 id=\"float%e9%a1%9e%e5%9e%8b%e7%9a%84%e7%b2%be%e5%ba%a6%e5%95%8f%e9%a1%8c-oIHMSrRrUn\">Float\u985e\u578b\u7684\u7cbe\u5ea6\u554f\u984c<\/h2>\n<p>\u9664\u4e86\u66f4\u5927\u503c\u9650\u5236\u5916\uff0cFloat\u985e\u578b\u9084\u5b58\u5728\u7cbe\u5ea6\u554f\u984c\u3002\u7531\u65bc\u5176\u5b58\u5132\u65b9\u5f0f\uff0c\u67d0\u4e9b\u5c0f\u6578\u5728\u8f49\u63db\u70baFloat\u6642\u53ef\u80fd\u6703\u51fa\u73fe\u8aa4\u5dee\u3002\u4f8b\u5982\uff0c\u5c070.1\u5b58\u5132\u70baFloat\u6642\uff0c\u5be6\u969b\u5b58\u5132\u7684\u503c\u53ef\u80fd\u662f0.10000000149011612\uff0c\u9019\u5728\u67d0\u4e9b\u61c9\u7528\u4e2d\u53ef\u80fd\u6703\u5c0e\u81f4\u4e0d\u5fc5\u8981\u7684\u932f\u8aa4\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u5728\u9700\u8981\u9ad8\u7cbe\u5ea6\u7684\u8a08\u7b97\u6642\uff0c\u5efa\u8b70\u4f7f\u7528Decimal\u6216Numeric\u985e\u578b\uff0c\u9019\u4e9b\u985e\u578b\u80fd\u5920\u63d0\u4f9b\u66f4\u9ad8\u7684\u7cbe\u5ea6\u548c\u66f4\u597d\u7684\u6578\u5b57\u8868\u793a\u3002<\/p>\n<h2 id=\"%e5%af%a6%e9%9a%9b%e6%87%89%e7%94%a8%e4%b8%ad%e7%9a%84%e8%80%83%e9%87%8f-oIHMSrRrUn\">\u5be6\u969b\u61c9\u7528\u4e2d\u7684\u8003\u91cf<\/h2>\n<p>\u5728\u9078\u64c7\u4f7f\u7528Float\u985e\u578b\u6642\uff0c\u958b\u767c\u8005\u61c9\u8003\u616e\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li><strong>\u6578\u64da\u7bc4\u570d:<\/strong> \u78ba\u4fdd\u6240\u9700\u7684\u6578\u64da\u7bc4\u570d\u5728Float\u7684\u6700\u5927\u503c\u9650\u5236\u5167\u3002<\/li>\n<li><strong>\u7cbe\u5ea6\u9700\u6c42:<\/strong> \u5982\u679c\u61c9\u7528\u9700\u8981\u9ad8\u7cbe\u5ea6\u8a08\u7b97\uff0c\u8003\u616e\u4f7f\u7528Decimal\u6216Numeric\u985e\u578b\u3002<\/li>\n<li><strong>\u6027\u80fd:<\/strong> Float\u985e\u578b\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\u53ef\u80fd\u6bd4Decimal\u985e\u578b\u66f4\u5feb\uff0c\u4f46\u9019\u53d6\u6c7a\u65bc\u5177\u9ad4\u7684\u61c9\u7528\u5834\u666f\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-oIHMSrRrUn\">\u7d50\u8ad6<\/h2>\n<p>Float\u6578\u64da\u985e\u578b\u5728\u6578\u64da\u5eab\u4e2d\u662f\u4e00\u500b\u91cd\u8981\u7684\u9078\u64c7\uff0c\u7279\u5225\u662f\u5728\u9700\u8981\u8655\u7406\u5c0f\u6578\u7684\u60c5\u6cc1\u4e0b\u3002\u7136\u800c\uff0c\u5176\u66f4\u5927\u503c\u9650\u5236\u548c\u7cbe\u5ea6\u554f\u984c\u662f\u958b\u767c\u8005\u5728\u8a2d\u8a08\u6578\u64da\u5eab\u6642\u5fc5\u9808\u8003\u616e\u7684\u56e0\u7d20\u3002\u4e86\u89e3\u9019\u4e9b\u9650\u5236\u53ef\u4ee5\u5e6b\u52a9\u958b\u767c\u8005\u505a\u51fa\u66f4\u660e\u667a\u7684\u6c7a\u7b56\uff0c\u5f9e\u800c\u63d0\u9ad8\u61c9\u7528\u7684\u7a69\u5b9a\u6027\u548c\u6e96\u78ba\u6027\u3002<\/p>\n<p>\u5982\u9700\u4e86\u89e3\u66f4\u591a\u95dc\u65bc\u6578\u64da\u5eab\u548c\u5176\u4ed6\u6280\u8853\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9 <a href=\"https:\/\/server.hk\">Server.HK<\/a>\uff0c\u6211\u5011\u63d0\u4f9b\u5404\u7a2e <a href=\"https:\/\/server.hk\">VPS<\/a> \u548c <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u89e3\u6c7a\u65b9\u6848\uff0c\u5e6b\u52a9\u60a8\u6eff\u8db3\u4e0d\u540c\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7a76\u6578\u64da\u5eabFloat\u7684\u66f4\u5927\u503c\u9650\u5236\uff0c\u4e86\u89e3\u5176\u5728\u6578\u64da\u5b58\u5132\u548c\u8a08\u7b97\u4e2d\u7684\u61c9\u7528\u53ca\u5f71\u97ff\uff0c\u52a9\u60a8\u512a\u5316\u6578\u64da\u5eab\u8a2d\u8a08\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-188444","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/188444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=188444"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/188444\/revisions"}],"predecessor-version":[{"id":188445,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/188444\/revisions\/188445"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=188444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=188444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=188444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}