0

I was using a ROUNDUP functions and find a very strange answers and later i found out that 1-1.09 = -0.0900000000000001 according to excel. i am not a mathematician but i think than correct answer 1 - 1.09 must be -0.09. i cant figure it out why the answer is -0.0900000000000001. is this a bug or i have missed something?

P.S. I am using Excel2016 16.0.4417.10000 64-bit, on Windows 10

Bes Gh
  • 13
  • 5
  • Looks like a classic floating point error. [Perhaps this will help.](https://www.microsoft.com/en-us/microsoft-365/blog/2008/04/10/understanding-floating-point-precision-aka-why-does-excel-give-me-seemingly-wrong-answers/) – Plutian Nov 28 '19 at 08:27

1 Answers1

1

Computers only have 0 and 1 to represent any value. Converting 0.1 into a binary number would result in a long ‘zeros-and-ones-number’: .0001100011000111000111

In order to avoid an endless number, Excel would round it at the end. But this rounding of the binary equivalent to 0.1 leads to miscalculation.

found it on here. Basically excel does it to save memory https://professor-excel.com/wrong-calculations-why-does-excel-show-a-wrong-result/

Deeroy
  • 303
  • 5
  • 16