• Welcome to the Off-Topic/Schweb's Lounge

    In addition to the Mac-Forums Community Guidelines, there are a few things you should pay attention to while in The Lounge.

    Lounge Rules
    • If your post belongs in a different forum, please post it there.
    • While this area is for off-topic conversations, that doesn't mean that every conversation will be permitted. The moderators will, at their sole discretion, close or delete any threads which do not serve a beneficial purpose to the community.

    Understand that while The Lounge is here as a place to relax and discuss random topics, that doesn't mean we will allow any topic. Topics which are inflammatory, hurtful, or otherwise clash with our Mac-Forums Community Guidelines will be removed.

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

Joined
Mar 30, 2005
Messages
9,571
Reaction score
25
Points
48
calculator-800x534.jpg
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


More...
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top