Possible Duplicate:
Moving decimal places over in a double
I have a problem in my android application using double variables. An EditText
parses a number, a double, and puts it in sql database. When I extract that value and I sum with other values the result is incorrect.
For example:
- I write and put in my db this: 64.1
- another value: 12.6
- another value: 400
then I sum these 2 values and the result is 476.70000000000005 wich is incorrect (should be 476.7).
How can I resolve this problem?