android-calculatorpp icon indicating copy to clipboard operation
android-calculatorpp copied to clipboard

Floating point division rounding

Open LeMinaw opened this issue 7 years ago • 2 comments

When performing 2.45/0.35, the calculator returns 7.0000000000000001. The expected result is obviously 7.

Android v5.1 CPP v2.2.3

LeMinaw avatar Oct 08 '16 20:10 LeMinaw

a same problem 10.53+25.12+62.3+68.72+65.902 => 413.2000000000001

68.72+65.902 => 269.2000000000001 (68.7+65.90)2 => 269.2000000000001 68.7+65.90 => 134.6 68.72+65.90 => 203.3 68.7+65.90*2 => 200.5

calculatorpp V2.2.3 Android v6.0

idib avatar Dec 21 '16 07:12 idib

Reduced test case:

8.7 - 1 = 7.699999999999999

Android v6.0.1 CPP v2.2.3

acshef avatar Feb 16 '17 23:02 acshef