Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtraction error

Status
Not open for further replies.

frothytoad

Technical User
Aug 1, 2003
32
US
Here is an odd thing that perhaps someone can help with. In an immediate window, type the following:

? 22.8 - 22.6

What you get is 0.199999999999

Now, it may have been a long time since my last math class, but I still can't help but to expect the answer 0.2.

Anyone know why this happens, and how to get it to behave correctly (short of putting Round(__,12) around every number in every formula in my entire project)?

Thanks,

-- Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top