Why this code 7.30 - 7.20
in ruby returns 0.0999999999999996
, not 0.10
?
But if i'll write 7.30 - 7.16
, for example, everything will be ok, i'll get 0.14
.
What the problem, and how can i solve it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…