Round Function Bug

Occasional Visitor

For instance, if the function =ROUND(E11-E12,2) is rounding incorrectly when E11 and E12 are 49.995 & 49.2 respectively. I noticed its also incorrect for 39 and 59. All other values seem to round correctly. Anything you notice here? Or is this an actual bug? It does work if I round to 3 decimals then round to two but I should not have to do that.

2 Replies

@Kclark1017 That is called a "floating point error". Google for that phrase and you can learn all about it. Increase the number of decimals like in the picture below and you'll see that 49.995 minus 49.2 is not resulting in the 0.795 that you expect.

Screenshot 2022-03-11 at 17.59.13.png

As Riny mentioned, it's floating point error. You could try rounding the inputs instead of rounding the result: