Microsoft fixes 2 year old bug in Windows 10 calculator

It took Microsoft two years before it fixed bug in the calculator built-in to Windows 10. The calculator in Microsoft's latest operating system provided incorrect results with rounding errors for the square root of a perfect square.

(Calculator (Rekenmachine) on Dutch Windows 10)

ADVERTISEMENT

Microsoft developer Raymond Chen explains in a blog that the calculation √4 − 2 should return zero, but instead the Windows 10 calculator returned −1.068281969439142e−19.  In 2016 already, Chen explained that the issue was caused by a new library used for the Windows 10 version of the built-in calculator.

Although the calculator looks similar to the built-in calculator of previous Windows versions, Microsoft rewrote the internal engine that is responsible for the calculations.  This was done after Microsoft received a lot of criticism that the calculator wasn't precise with some specific calculations.

Unfortunately, this rewrite caused a bug that is now, two years later, finally fixed. You can check if you have the latest version of the Windows 10 calculator by typing '4' -> '√' -> '-' -> '2'. The result should be zero, if you get −1.068281969439142e−19, then you have an older version installed.

ADVERTISEMENT

The new calculation method has a drawback, it's a couple of milliseconds slower, according to Chen. However, in reality, nobody will notice that difference.

No posts to display