在Ruby 2.2.0中,为什么:
BigDecimal.new(34.13985572755337, 9)
Run Code Online (Sandbox Code Playgroud)
平等34.0但是
BigDecimal.new(34.13985572755338, 9)
Run Code Online (Sandbox Code Playgroud)
平等34.1398557?
请注意,我在64位计算机上运行它.
ruby floating-point rounding bigdecimal floating-point-precision