Bug! a very simple substraction shows wrong result (Excel 2010)

tony567

Well-known Member
Joined
Aug 23, 2008
Messages
515
Wow, i think i found a bug :biggrin:

try this very simple substraction:

=11.11-11

on my computer the result is 0.109999999999999 :rolleyes:

another:

=13.71-13 -----> 0.710000000000001
=31.15-31 -----> 0.149999999999999
etc....

please let me know if you got same result. thank you
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
It isn't a bug, it is the inherent imprecision of floating point arithmetic.
 
Upvote 0
Its called round off error. It comes from the conversion from decimal to binary never being exact.
Every piece of software on every computer experiences this. How many decimals out it begins may vary, but it's always there.
 
Upvote 0
ooops, sorry to early name it as a bug :)

anyway, i want to retrieve only the decimal number

i try A1-TRUNC(A1) but got that result. any suggestion for a precise result?

my decimal is not more than 4 decimal digit.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top