apesic / rpncalc

A simple RPN (Reverse Polish Notation) calculator app built using Flutter
GNU General Public License v3.0
27 stars 1 forks source link

Can't handle exponents with repeating decimals #12

Closed anaskaejdar closed 1 year ago

anaskaejdar commented 2 years ago

Basically I'm trying to calculate 2^(1/24),

Screenshot_۲۰۲۱۱۲۰۳-۲۳۴۳۴۴

but after this button press on the yˣ button,

Screenshot_۲۰۲۱۱۲۰۳-۲۳۴۳۵۰

the app freezes, and any subsequent button presses turns the whole screen grey.

It's a different story entirely with a simpler exponent like 2^(1/4)

wviana commented 1 year ago

Is it the right way to enter your expression? Thought it should be something as this:

2
1
14
÷
yˣ
anaskaejdar commented 1 year ago

Is it the right way to enter your expression? Thought it should be something as this:

2
1
14
÷
yˣ

That is the same order as what I posted, except you have 14 where I had 24

wviana commented 1 year ago

Oh, ok my bad, I confused it. So trying using current version I got into the result of 1.029302236643492. It matches same expression in python interpreter. Looks like it was changed the "calculator engine" now it's using an external lib to do the math, looks to work better.

wviana commented 1 year ago

Look at this issue, looks like the mantainer already pushed this lib usage. Probably they should close this linked issue.

anaskaejdar commented 1 year ago

The last F-Droid release was June 2021 (six months later than the last github release), but that fdroid release must have had this bug, since I reported it in December 2021.

The new lib probably caused this problem somehow.

wviana commented 1 year ago

Oh, so the F-Droid is way behind master. Will try to configure a git action to build apk and place it into the release.