Closed realeatham closed 5 months ago
yeah its /100
@notKamui do you know of a way to solve this easily
I have no clue how I would
@realeatham
This is not an issue to me.
"59 - 9%" SHOULD be read as "59 minus 9/100" and not "59 minus 9/100 of 59".
Some calculators will interpret this bastard expression as the second sentence, but it's effectively quite rare because it's very much ambiguous and not normative. In "59 - 9%", there is absolutely nothing that explicits that "9%" is refering to "9/100 of 59".
In fact, most basic calculators either do not have the % symbol XOR do not support continuous infix notation. What I mean is that the calculators that support % generally display only the result of each operation individually each time you press on an operator, in which case the % has no ambiguity.
I would just remove the % operator if I where you. It's generally redundant.
To add to this, Keval will never be able to support this, and most expression evaluators won't either, because it is contextual expression evaluation, which, again, is not conventional at all.
oh ok
Then it should be removed no ons don't need a /100 button
To be clear, I COULD add support for contextual operations, but I'm not quite sure I want this for Keval.
Should I close this or rename it
close as not planned
Describe the bug Percentage modifier does not work correctly
To Reproduce Do 59 - 9%, it will output 58.91 instead of 53.69
Expected behavior It should subtract 9% of 59 not 9% of 100
Screenshots
https://github.com/sosauce/CuteCalc/assets/136866675/a50c9fcc-ac2f-497c-8564-905e4a24ffd4
Smartphone (please complete the following information):
I think I know what is wrong, I haven't looked at the code yet but it probably says percent is just /100