2é²è¨ç®ã«ããæµ®åå°æ°ã®èª¤å·®ã«ã¤ãã¦æèãªãå¹³æ°ã§æ¼ç®ãããæ¯è¼ããã±ã¼ã¹ãããè¦ããã¾ãã 大æµã¯ãã¾ãåé¡ã¯çºçããªãã®ã§ãããç¹æ®ãªã±ã¼ã¹ã§äºæ³ã¨åããçµæã¨ãªãã¾ãã è²ã ã¨è©¦ãã¦ã¿ã¾ããã Ruby(irb)ã®å ´å irb(main):001:0> 1-0.9 == 1/10 => false Rubyã§Fixnumåã§ã®æµ®åå°æ°ã¯2é²æ°è¨ç®ã¨ãªãããã§ãã å°æ°è¡¨ç¾ãå é¨çã«2^nã§ãããããã¦ããããã«çºçããåé¡ã§ãã 10é²ã§å¤ãä¿æããbigdecimalã使ç¨ããã®ã妥å½ãªè§£æ±ºçã¨æããã¾ãã irb(main):001:0> require 'bigdecimal' irb(main):002:0> n1 = BigDecimal("1") irb(main):003:0> n09 = BigDecimal("0.9") irb(main):004:0> n10 =
{{#tags}}- {{label}}
{{/tags}}