Javascript Math.round() wrong calculation

24 Views Asked by At

I've came across this issue and really can't figure out what i'm doing wrong.

So I use math.round to get 2 floating point of a variable. Later on i need to multiply this value *100. But somehow I receive an invalid number.

(Math.round(8.80*100)/100)*100  
880.0000000000001

I've tested it on w3schools try editor. Why is this happening?

0

There are 0 best solutions below