Microsoft Windows Calculator Bug, Sqrt(4) – 2 != 0

share this: facebook | twitter | google+ | reddit | email | leave a comment

Yesterday we posted about a bug found in Windows 8:

Windows 8 Taskbar Context Menu Bug

And now its turn of Windows Calculator. Almost all Windows users use the default Calculator application which comes preinstalled with Windows OS. But did you know it contains a bug which has not been fixed by Microsoft yet. This bug exists in almost all Windows versions including Windows XP, Vista, 7 and Windows 8.

The bug appears when you try to calculate following:

sqrt(4)-2

If you can't understand the above mentioned equation, lets describe it in details. The above command first calculates Square root of 4 and then subtracts 2 from the result.

Square root of 4 is 2 and when we subtract 2 from it, the end result should be 2-2=0 but Calculator shows a long series of numbers in the result.

If you use the Standard mode of Calculator, the result would be displayed as -1.068281969439142e-19 and if you use Scientific mode, you'll get the result as -8.1648465955514287168521180122928e-39 as shown in following screenshot:

Windows_Calculator_Bug.png

Its definitely a bug in Calculator. You might get different result in different Windows versions but the result will never be correct i.e. 0.

Following video shows the bug live in action:

The only reason behind this bug which I can figure out might be the way computer calculates square root. The square root of 4 is calculated as 1.9999..... up to infinite by computer and it shows the result as 2 using the round off mechanism. And when we subtract 2 from the result, it actually subtracts it from 1.9999..... up to infinite and shows the big series of numbers in minus.

Anyway after all the facts or assumptions, its definitely a bug similar to Notepad bug which also exists in all Windows versions:

Notepad Statusbar Bug Found in All Windows Versions

Thanks to our reader "Anish Mehta" for sharing this bug...





Posted by: | Categories: Windows 7, Windows 8, Windows Vista, Windows XP


Other similar articles that may interest you


Comments

Leave a Comment

(required)