cyberos / cyber-calculator

Calculator
GNU General Public License v3.0
0 stars 0 forks source link

Percentage problem #12

Open felixguilherme opened 3 years ago

felixguilherme commented 3 years ago

Using the last version of Cyber Calculator I noticed a problem. When you do percentage calculations, it does not take the percentage from the number at left, but the N% of 1 (I don't know if it was clear, so see below). image (100+5% should be 105, but it calculates 5% of 1, which is 0.05, and adds to 100)

When you use the Windows or Android calculator (I don't know about Gnome Calculator or KCalc) to do percentage calculations, it does automatically for you and also inserts into the equation. I think that would be a great addition to Cyber Calculator, avoiding this type of problem.

Also, congratulations for the most interesting distro from the last years and sorry if I misspelled something wrong, english isn't my first language.

itsvic-dev commented 3 years ago

This isn't really a bug, but more of an enhancement.

It does the calculation correctly (it first evaluates 5%, then adds it to 100), but the user sees it as a possible issue. You can work around this by doing (100+5)%.

The equation evaluator comes from KDE as I see, so it may be coming from KCalc. @rekols will know more about it, I'm sure.