javascript, now I have one issue that some calculations have flaws like when I am adding 8.2+3.2 answer is not exact hat is expected, how can i fix that?
Show your code
float are not good at precision, that's why you get strange results like 0.1 + 0.2 == 0.30000000000000004. you should round the result with something like Math.round(result * 1000) / 1000(this will display 3 digits at most after the point)
Обсуждают сегодня