Fixed Why does adding 0.1 multiple times remain lossless? #dev #it #asnwer
Fixed Why does adding 0.1 multiple times remain lossless? #dev #it #asnwer
Why does adding 0.1 multiple times remain lossless?
I know the 0.1 decimal number cannot be represented exactly with a finite binary number (explanation), so double n = 0.1 will lose some precision and will not be exactly 0.1. On the other hand 0.5 can be represented exactly because it is 0.5 = 1/2 = 0.1b.
Having said that it is understandable that adding 0.1 three times will not give exactly 0.3
View On WordPress











