The Windows 10 UWP calculator retains the math engine from before, which actually has been rewritten. The ancient calculator used standard floating-point math, with the fun problems that entails, like 0.1 + 0.1 showing 0.19999999998. The current engine uses rational numbers as long as possible and configurable precision for trigonometry, roots, etc. It also got further upgraded over the years so that the root of a perfect square is always an integer.
As for the bug in question, it could not have happened in the old calculator, as that one didn't have the date math panel.
So for the UWP version they merely redid the UI and added a few things. The actual calculator part is still the same as before (just open-source now).
Re:Fixing a Small Calc.exe Bug
by piyush_soni on Wednesday June 19, 2019 @03:19AM
(#20221442)
Are you saying that the 'old' (i.e. Windows 7 calculator) didn't have a Date calculation panel? Because I'm seeing it right now in front of me.
I had no idea that was in there along with all of the other things like a PMT calculator and unit conversion. I would normally switch to the scientific calculator after getting a fresh Windows 7 and never open that menu again.
Ah, haven't seen the old calculator in years, so wasn't aware that it was in there. Then they only redid the UI.
Re:Fixing a Small Calc.exe Bug
by fireattack on Wednesday June 19, 2019 @04:30AM
(#20221701)
I also don't know it until today, but calc.exe in Win 7 does have a date calculator.
It's also open source https://github.com/microsoft/calculator
I know some people like to comment on the headline rather than reading the content but that comment is literally the first line in the article:
> tldr; saw a Windows Calculator bug on reddit. Since calc.exe was open-sourced I thought Iād try to find the bug and fix it.
[dead]
Re:Fixing a Small Calc.exe Bug
by onefullclick on Wednesday June 19, 2019 @02:58AM
(#20221351)
There are almost 8 billion people in the world. I think 17,000 people is a small number. And geeks are going to geek and nothing geekier than checking Microsoft Calculator, a simple project that everyone can relate to.
Re:Fixing a Small Calc.exe Bug
by guardian5x on Wednesday June 19, 2019 @06:07AM
(#20222092)
I think you are right. Another possible explanation would be a big conspiracy though, and probably the government is also involved somehow.
That's actually exactly what happened. The original calc.exe (in all versions up to Windows 8.1) came from Windows 1.0, in plain C, very seldomly updated over the years.
The one in Windows 10 is totally rewritten in C++ using the "Universal Windows Platform" as an API rather than classic Win32.