ã³ã¡ã³ã IPAã®æ å ±å¦ç試é¨ã®åå¼·ç¨ã¨ãã¦ã¨ãJavaScriptã§å°æ°ã®è¨ç®ã®èª¤å·®ã ãªãçºçããã®ããã¡ãã¨ç解ãããã£ãã®ã§ä½æãã¾ããã ãããã§ã0.1 + 0.2ãããªã0.3ã«ãªããªãã®ããããããåä½ã§ææ¡ã§ãã¾ããã 丸ãæ¹å¼ã®1ã¤ã«ã丸ããåã®å®æ°ã¨è·é¢çã«æãè¿ãæ°ã«ä¸¸ããã RN (Round toNearest)æ¹å¼ãããã¾ãã mé²æ°ã§ãm/2-1æ¨m/2å ¥ãã10é²æ°ã ã¨åæ¨äºå ¥ã2é²æ°ã ã¨0æ¨1å ¥ã«ãªãã¾ãã 誤差ãã§ããã ãå°ããããæ¹æ³ã¨ãã¦å©ç¨ããã¾ãã ãã ãIEEE754ã®RNæ¹å¼ã¯å¶æ°ä¸¸ãã¨å¼ã°ããã2ã¤ã®æ¡ã使ã£ã¦å¤æããæ¹æ³ãæ¡ç¨ãã¦ãã¾ãã ã00ãâã00ããã01ãâã00ããã10ãâã10ããã11ãâã100ãã 0.1ã¨0.2ã¯1æ¡ç°ãªãå¤ã§ãããã㤠ã©ã¡ããä»®æ°é¨ã®æä¸ä½ããããç¹°ãä¸ãã£ãå¤ã«ãªãã¾ãã ãã®çµæ0.1ã¨
{{#tags}}- {{label}}
{{/tags}}