calc.exe is now open source; there’s surprising depth in its ancient code

calc.exe is now open source; there’s surprising depth in its ancient code

Enlarge (credit: jakeandlindsay)

Microsoft’s embrace and adoption of open source software has continued with the surprising decision to publish the code for Windows Calculator and release it on GitHub under the permissive MIT license.

The repository shows Calculator’s surprisingly long history. Although it is in some regards one of the most modern Windows applications—it’s an early adopter of Fluent Design and has been used to showcase a number of design elements—core parts of the codebase date all the way back to 1995.

The actual calculations are performed by this ancient code. Calculator’s mathematics library is built using rational numbers (that is, numbers that can be expressed as the ratio of two integers). Where possible, it preserves the exact values of the numbers it is computing, falling back on Taylor series expansion when an approximation to an irrational number is required. Poking around the change history shows that the very earliest iterations of Windows Calculator, starting in 1989, didn’t use the rational arithmetic library, instead using floating point arithmetic and the much greater loss of precision this implies.

Read 1 remaining paragraphs | Comments

Post Author: martin

Martin is an enthusiastic programmer, a webdeveloper and a young entrepreneur. He is intereted into computers for a long time. In the age of 10 he has programmed his first website and since then he has been working on web technologies until now. He is the Founder and Editor-in-Chief of BriefNews.eu and PCHealthBoost.info Online Magazines. His colleagues appreciate him as a passionate workhorse, a fan of new technologies, an eternal optimist and a dreamer, but especially the soul of the team for whom he can do anything in the world.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.