Closed Wjxfi closed 1 year ago
Hello @Wjxfi , yetCalc calculates percentages in a more traditional, mathematical way. To get the same result as open calc, use % operator with asterisk(). For example: 1000-90%1000
I will mention this issue in help so that more users can get an idea. By default percentage operator calculates in 1
Where's the asterisk? I don't see it
I don't think that's convenient. Writing half a math example all over again, and before I do, I need to find where that asterisk is
Can you make a percentage mode switch in the settings? That would be very helpful
Sorry @Wjxfi , by asterisk I meant the multiplication operator. Hope this helps. I have just updated the help as well.
Sorry about the asterisk part, that was a mistake
@Wjxfi sure I was thinking to add that but couldn't figure out how since the calculations are handled directly by mXparser. I will add it surely when I figure it out.
@Yet-Zio your method doesn't work
@Wjxfi ofc its not gonna work for division. You are dividing 150/5% , which I don't know how open calc's implementation is, percentage really varies even in google, but its quite different. Whereas in yetcalc you are dividing 150/5%*150, that means 5% of 150 or 150/5%/150, that means 5% by 150. The question here is how is open calc handling it, it appears wrong to me. For division you can do basically: 150/5% which would work. No need for multiplication if that's your doubt. Hope it helps. Feel free to ask anything. I am having exams tmrw and about to sleep, that's why there was a delay in conversations.
just look in the opencalc code https://github.com/Darkempire78/OpenCalc
@Wjxfi I have looked at the source code, particularly at Expression.kt , it does not explicitly state how it handles every operator. Also the result is wrong, percentages are not handled like that(mathematically). You can enter the same expression in any other calculator other than open calc, for example: 150/5% , it should give 3000. Percentages are calculated in 1 by default. So the expression: 150/5% will give you the result(you don't need to multiply), here yetCalc is correct.
Closing as this is hopefully solved
you could have asked the developer how to do it.. okay
@Wjxfi, I was talking about how division operators are handled through percentages. Your screenshots provided had this expression: 150/5%/150. Now why would you divide a percentage or multiply it? You only do that for adding and subtracting.
It should be just 150/5% which is 3000. Please check with any other calculator as well. Result in openCalc is wrong.
opencalc vs yetcalc
![312160.jpg](https://user-images.githubusercontent.com/113500363/218331864-04106070-0188-4078-9635-78fdf8bffaa1.jpg)