Xiq
Active Member
Hello everyone, its been a while since my last post on this forum ![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I found a frustrating problem (first time I noticed this after all these years using Excel), for example:
I would expect the result to be exactly 0.1
however Excel is returning 0.0999999999999996
So my test:
Will of course return FALSE...
I assume this has to do something with floating point stuff (see here a MS support page).
Is there a better solution to this problem, other than using the ROUND function and hardcode the number of decimals to round? Using the "Precision as displayed" option sounds a bit tricky to use in my opinion.
I found a frustrating problem (first time I noticed this after all these years using Excel), for example:
Code:
=5.1-5
however Excel is returning 0.0999999999999996
So my test:
Code:
=5.1-5=0.1
I assume this has to do something with floating point stuff (see here a MS support page).
Is there a better solution to this problem, other than using the ROUND function and hardcode the number of decimals to round? Using the "Precision as displayed" option sounds a bit tricky to use in my opinion.