What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Calculator Wrong Answer

hitec

New Member
Today I was double checking some numbers and according to the Droid Calculator 3279.18 - 3278.78 = .3999999
Can anyone confirm this happens with theirs?

Further testing gives the correct answers
9.18 - 8.78 = .4
79.18 - 78.78 = .4
279.18 - 278.78 = .4

I am running Chevy 1.25GHz ULV on Simply Stunning 4.4. Slowing down the CPU does not affect the calculator results at all.
 
I get .3999999999 but I have a calculator from some other phone I cant remember what it is though.

Edit: It's from the Desire.
 
Last edited:
It is not a rounding problem, it is a problem with how floating point numbers are stored in computers. My suggestion, download RealCalc Scientific Calculator from Brain Overspill. That's the one I use, and when I tried your problem it worked fine.

For more info on floating point numbers see here: https://secure.wikimedia.org/wikipedia/en/wiki/Floating_point

EDIT: In the built in calculator I did get .3999999.
 
Last edited:
That's interesting. I get the same answer as well. I guess I will have to get that RealCalc app mentioned above. Thanks for the heads up.
 
Thanks everyone for confirming that is was not just my droid. I thought it was interesting that the floating point error shows up in a simple subtraction.

jacobrv. Thanks for the heads up on RealCalc. It is overkill for most of my needs, but the main thing I want in a calculator is a correct answer. :)
 
Back
Top