svenstaro / rofi-calc

🖩 Do live calculations in rofi!
MIT License
964 stars 31 forks source link

Adding percentage of a number to itself doesn't work as expected #89

Closed sathishmanohar closed 2 years ago

sathishmanohar commented 2 years ago

In regular calculators when we want to add 50% of number to the number itself we simply do:

10 + 50% which should output 15

However in qalc the output is 10.5 which isn't very intuitive.

image

Currently the expected behaviour can be done with 50 % 10 + 10 which outputs 15 but this isn't the shorthand most users are used to from regular calculators.

svenstaro commented 2 years ago

Weird, I'm getting this: image This is what you expect to get, right? Might be your system locale or some global qalc setting. What's your qalc version?

sathishmanohar commented 2 years ago

Weird. I don't have any other qalc setting. I just installed it. My version is (0.9.10-1)

sathishmanohar commented 2 years ago

My machine is Ubuntu 18.04. I didn't get the same behaviour in my 22.04 machine. It works as expected in my Ubuntu 22.04.

svenstaro commented 2 years ago

Yeah old Ubuntu versions have ancient versions of qalc. Nothing I can do about that.