Closed sergeevabc closed 1 year ago
cpc doesn't treat addition of percentages as multiplication, so you'd have to do 90 * 110%
.
Not sure whether it's a good idea, or what the implementation should be like, if this is implemented
Spotlight:
90 + 10% = 90.1
90 + (5% + 5%) = 90.1
Google:
90 + 10% = 99
90 + (5% + 5%) = 90.1
Raycast:
90 + 10% = 99
90 + (5% + 5%) = 99
Google Calculator:
90 + 10% = 99
90 + (5% + 5%) = 90.0525
Since I'm coming from pre-Internet era, my reference devices are a hardware calculator by Citizen and a software one by Microsoft shipped with Windows OS. Both give me 99 in the first case (common scenario is to calculate price increase).
Thing is I need a lightweight portable CLI calculator, because it is faster to type such an expression than to point'n'click. Qalc is a good one, but it's not lightweight, alas.
As for x + (5% + 5%)
, not sure what it is.
It seems a bit tricky. How to treat
10 + 5% + 5%
5% + 5%
10 + 5% * 2
10 + 10 + 10%
Oh, cpc v.1.9.3 (September 2023) still produces results that are inconsistent with the rest of the world. Still 90.1 instead of 99. Aggrrhh.
I'd welcome a PR
It's not really possible to be consistent with the rest of the world when they're all inconsistent with each other (And Google isn't not even consistent with themselves). So I'm undecided on the best appoach.
qalc 90+10%=99, but cpc 90+10%=90.1