Calculator Does Not Reliably Subtract Two Numbers in Windows
This article was previously published under Q72540
Microsoft Windows Calculator (CALC.EXE) does not reliably subtract twonumbers with decimal values. This problem occurs in both modes (standardand scientific) of Calculator.
Calculator does not round the decimal values properly. While Calculator isdetermining how to display the solution, it encounters a loss of precisionand shows an incorrect answer.
Windows 3.0Microsoft has confirmed this to be a problem in Windows 3.0.
Windows 3.1x, Windows for Workgroups 3.1xTo correct this problem in Windows 3.1x and Windows for Workgroups 3.1x,obtain the updated CALC.EXE file from the Microsoft Web site.
Steps to Reproduce Problem
- Start Calculator.
- Input the largest number to subtract first (for example, 12.52).
- Press the MINUS SIGN (-) key on the numeric keypad.
- Input the smaller number that is one unit lower in the decimal portion (for example, 12.51).
- Press the EQUAL SIGN (=) key on the numeric keypad.
Subtracting 12.51 from 12.52 results in one of the following incorrectnumbers:
0.00 0.0099999999 0.010000001
3.0 3.00 3.1 3.10 subtraction 3.11 appnote
Article ID: 72540 - Last Review: 09/24/2011 03:30:00 - Revision: 3.0
- Microsoft Windows 3.0 Standard Edition
- Microsoft Windows for Workgroups 3.1
- Microsoft Windows for Workgroups 3.11