Why 6.84 - 3.6 == 3.2399999999999998

前端 未结 7 733
星月不相逢
星月不相逢 2020-12-22 03:13

I just encountered this and can\'t figure out why exactly Ruby behaves this way.

Could someone explain why in Ruby:

6.84 - 3.6 == 3.2399999999999998
         


        
7条回答
提交回复
热议问题