Simple-Calculator icon indicating copy to clipboard operation
Simple-Calculator copied to clipboard

Long decimal input 0.9999... results in increasing value

Open adsche opened this issue 3 years ago • 3 comments

Hey, first of all, I love the simple mobile tools! Amazing job all around!

This bug might be related to #195, but I'm not sure:

If you type a long decimal number starting with 0.999..., as soon as the number is long enough so that the font size changes, the number increases by one with each newly input digit.

e.g. for me, 0.9999999999, add another 9 => 1.9999999999; another 9 => 2.9999999999 and so on.

This doesn't seem like just "accuracy loss" as #195, since it becomes increasingly far off, maybe they are related.

Keep up the great work, cheers!

adsche avatar Mar 22 '22 14:03 adsche

what app version are you using?

tibbi avatar Mar 22 '22 14:03 tibbi

Sorry, I used to know how to write bug reports 😅

It's 5.7.2 (via fdriod) on Android 10.

adsche avatar Mar 22 '22 14:03 adsche

I have debugged this issue and #195 issues. Cause : Whenever the number crosses the size of "Double" (64bit), the app can't handle the calculation and formatting. location : numberhelper > addGroupingSeparators > toDouble method. Suggestion : Add a validation, and return "Out of range" message/error

**Probably you already knew this.

rsb-23 avatar Jun 18 '22 13:06 rsb-23