{"id":20051,"date":"2026-09-15T16:00:53","date_gmt":"2026-09-15T06:00:53","guid":{"rendered":"https:\/\/geoffreychen.com\/why-point-one-plus-point-two-may-not-equal-point-three\/"},"modified":"2026-09-15T16:00:53","modified_gmt":"2026-09-15T06:00:53","slug":"why-point-one-plus-point-two-may-not-equal-point-three","status":"publish","type":"post","link":"https:\/\/geoffreychen.com\/zh\/why-point-one-plus-point-two-may-not-equal-point-three\/","title":{"rendered":"0.1\u52a00.2\uff0c\u7535\u8111\u4e3a\u4ec0\u4e48\u4e0d\u4e00\u5b9a\u5f97\u52300.3\uff1f"},"content":{"rendered":"<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/public-assets.geoffreychen.com\/wordpress\/articles\/why-point-one-plus-point-two-may-not-equal-point-three\/8f56fcc9d10749074ea7f1f3.jpg?w=1140&#038;ssl=1\" alt=\"0.1\u52a00.2\uff0c\u7535\u8111\u4e3a\u4ec0\u4e48\u4e0d\u4e00\u5b9a\u5f97\u52300.3\uff1f\" loading=\"lazy\"><\/p>\n<p>\u5728\u6570\u5b66\u91cc\uff0c0.1\u52a00.2\u6070\u597d\u662f0.3\u3002\u4f46\u5728 Python \u7684\u666e\u901a\u6d6e\u70b9\u6570\u8ba1\u7b97\u4e2d\uff0c\u7ed3\u679c\u5e38\u663e\u793a\u4e3a0.30000000000000004\uff0c\u76f4\u63a5\u62ff\u5b83\u4e0e0.3\u6bd4\u8f83\u8fd8\u4f1a\u5f97\u5230\u201c\u4e0d\u76f8\u7b49\u201d\u3002\u8fd9\u4e0d\u662f\u52a0\u6cd5\u89c4\u5219\u51fa\u4e86\u9519\uff0c\u800c\u662f\u8f93\u5165\u5728\u5b58\u50a8\u65f6\u5df2\u7ecf\u53d8\u6210\u4e86\u8fd1\u4f3c\u503c\u3002<\/p>\n<p>\u7535\u8111\u5e38\u7528\u7684\u6d6e\u70b9\u6570\u4ee5\u4e8c\u8fdb\u5236\u5206\u6570\u8868\u793a\u6570\u503c\u3002\u5341\u8fdb\u5236\u76840.1\u5728\u4e8c\u8fdb\u5236\u91cc\u9700\u8981\u65e0\u9650\u5faa\u73af\u7684\u6570\u5b57\uff0c\u6709\u9650\u5b58\u50a8\u7a7a\u95f4\u53ea\u80fd\u9009\u4e00\u4e2a\u5f88\u63a5\u8fd1\u5b83\u7684\u503c\u30020.2\u548c0.3\u4e5f\u5206\u522b\u88ab\u8fd1\u4f3c\uff1b\u76f8\u52a0\u540e\u518d\u6b21\u820d\u5165\uff0c\u5f97\u5230\u7684\u5b58\u50a8\u503c\u53ef\u80fd\u4e0e\u76f4\u63a5\u8f93\u51650.3\u6240\u5f97\u7684\u5b58\u50a8\u503c\u4e0d\u540c\u3002\u65e5\u5e38\u663e\u793a\u53c8\u5e38\u628a\u957f\u6570\u5b57\u7f29\u77ed\uff0c\u4e8e\u662f\u6709\u65f6\u770b\u8d77\u6765\u76f8\u7b49\uff0c\u7cbe\u786e\u6bd4\u8f83\u5374\u4e0d\u76f8\u7b49\u3002<\/p>\n<p>\u8fd9\u91cc\u8981\u5206\u6e05\u4e09\u4e2a\u5c42\u6b21\uff1a\u6570\u5b66\u4e2d\u7684\u6570\u503c\u3001\u673a\u5668\u4e2d\u7684\u6709\u9650\u8868\u793a\u3001\u5c4f\u5e55\u4e0a\u7684\u663e\u793a\u3002\u666e\u901a\u6d4b\u91cf\u53ef\u4ee5\u6309\u9002\u5f53\u8bef\u5dee\u8303\u56f4\u6bd4\u8f83\uff1b\u9700\u8981\u7cbe\u786e\u5341\u8fdb\u5236\u91d1\u989d\u65f6\uff0c\u5e94\u4f7f\u7528\u4e13\u95e8\u7684\u5341\u8fdb\u5236\u6216\u6574\u6570\u8868\u793a\u3002\u8fd9\u662f\u8868\u793a\u65b9\u5f0f\u7684\u9650\u5236\uff0c\u4e0d\u662f\u6240\u6709\u7535\u8111\u8ba1\u7b97\u90fd\u4e0d\u53ef\u9760\u3002<\/p>\n<p>\u8d44\u6599\uff1ahttps:\/\/docs.python.org\/3\/tutorial\/floatingpoint.html<\/p>\n<p>","protected":false},"excerpt":{"rendered":"","protected":false},"author":17897162,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_geoff_meta_description_en":"Decimal addition is sound; common binary floating-point formats approximate some decimal inputs. A Python result helps distinguish mathematical values, storage and display.","_geoff_meta_description_zh":"\u6570\u5b66\u91cc\u7684\u5c0f\u6570\u52a0\u6cd5\u6ca1\u6709\u95ee\u9898\uff0c\u5dee\u5f02\u6765\u81ea\u5e38\u89c1\u4e8c\u8fdb\u5236\u6d6e\u70b9\u6570\u5bf9\u5341\u8fdb\u5236\u5c0f\u6570\u7684\u6709\u9650\u8fd1\u4f3c\u3002\u4ee5 Python \u7684\u8ba1\u7b97\u7ed3\u679c\u4e3a\u4f8b\uff0c\u8bf4\u660e\u6570\u503c\u3001\u5b58\u50a8\u8868\u793a\u4e0e\u663e\u793a\u7ed3\u679c\u4e4b\u95f4\u7684\u533a\u522b\u3002","_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[787297218],"tags":[787300353,787300350,787300352,787300351],"class_list":["post-20051","post","type-post","status-publish","format-standard","hentry","category-daily-maths-physics-chemistry","tag-representation-error-zh","tag-floating-point","tag-representation-error","tag-floating-point-zh",""],"translatepress_titles":{"en_AU":"Why Might a Computer Say 0.1 Plus 0.2 Is Not 0.3?","zh_CN":"0.1\u52a00.2\uff0c\u7535\u8111\u4e3a\u4ec0\u4e48\u4e0d\u4e00\u5b9a\u5f97\u52300.3\uff1f"},"jetpack_publicize_connections":[],"jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1ar9H-5dp","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/posts\/20051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/users\/17897162"}],"replies":[{"embeddable":true,"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/comments?post=20051"}],"version-history":[{"count":0,"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/posts\/20051\/revisions"}],"wp:attachment":[{"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/media?parent=20051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/categories?post=20051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geoffreychen.com\/zh\/wp-json\/wp\/v2\/tags?post=20051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}