Windows Calculator Bug and Its Cause

Software are hardly free of bugs. But would you believe that as simple software as Windows Calculator, also has a serious bug?! Well, there is indeed a software problem in Windows Calculator. Let’s see what it is and the reason behind it.

The calculator tool has been available in all the versions of Microsoft Windows and has been vastly used by Windows users. However, do you know that there is a bug in Windows calculator? Follow these steps to see this bug:

  1. Open Windows Calculator
  2. Write 4 on calculator
  3. Take its square root (sqrt) … 2 will be shown as the answer
  4. Now subtract 2 from the 2 result
  5. Instead of showing 0, Windows Calculator will show -1.068281969439142e-19 in standard mode and  -8.1648465955514287168521180122928e-39 in scientific mode

This error appears whenever you subtract a number from the result of the sqrt (square root) of that number. So, you can be reproduced using any number.

Windows calculator bug (shown with number 4)

Calculator application comes bundled with Windows and this bug is present in all the versions of Windows. You can test it yourself.

Cause of Calculator Bug

The main reason behind Windows Calculator bus lies in the order of operations you perform and how the Windows Calculator application handles them. To get the correct answer from Calculator you would need to do the step in the following sequence:

  1. Start the calculator
  2. Press 4
  3. Take sqrt of 4 by pressing button. The answer will be 2 (this result remains in calculator’s memory)
  4. Click subtract button (now operation in memory is subtract)
  5. Click equals to button (=)
  6. Calculator will show 0 (which is correct)

When you press equal to button, Windows Calculator repeats the operation in the memory on the value that is there in memory. This is why when erroneous value appears when you repeat press number to be subtracted.

Fount it amusing?! I am sure it is. Bugs are always there is software. Sometimes, unexpected operations are also intentionally inserted by software engineers. Such operations are called Easter Eggs. I have published an article on amusing Easter Eggs in Google services. You might enjoy them too.

Please share your feedback on this article. Thank you using TechWelkin.

Leave a Comment

Your email address will not be published. Required fields are marked *