calculator-v2
calculator-v2 copied to clipboard
app does not work correctly
Hi. . I added data from the project according to the instructions. After installing on the phone, the calculation of the equation with several operators does not work correctly. example: does not work - cos (60) * 2-1 ("Error" in @+id/display_secondary) works - 1 * cos (60) * 2-1
please help me solve this problem (
Hey @kollabz, I'm sorry to hear it's not working for you. It's possible it's a bug, or maybe something's just obsolete since I haven't updated the app in several years.
Could you try installing the official apk and see if it has the same problem? https://github.com/scottmangiapane/calculator-v2/releases
I installed the application and it works correctly.) But I would like to add your code to my application and add the functions arcsin, arccos, arctan. Did you further modify the application after release?
I have not modified the application after the release so I think it's just old. I realize in hindsight that I should have committed the entire project directory instead of just app/src/main
... Maybe that would've helped. However the equation parsing/solving should still work if you copy it to your own project since it's just regular Java.
I'll see if I can get this app updated and let you know how it goes.
Whoops- it's a bug. When cos(n)
evaluates to a negative number and there is already a negative sign in front of it, the double negative is never handled and parsing fails. Looks like the official apk has this issue as well. Are you sure it worked for you?
I made this app for fun as a college freshman so the testing was a little less than thorough :) Honestly I recommend using something more stable for your own app. This looks viable. You would write your expression as "-Math.cos(60) * 2 - 1"
and it also supports arcsin, arccos, etc. The Java Expressions Library might also work although I haven't tested it.