linuxdeepin / deepin-calculator

Calculator for DDE
GNU General Public License v3.0
38 stars 51 forks source link

How to use % in it? #12

Closed DanyGee closed 3 years ago

DanyGee commented 6 years ago

How can I calculate for example 5000 - 30%? When trying 5000-30% it throws an error: zrzut ekranu deepin_deepin-calculator_20180911123015 bitmoji

reionwong commented 6 years ago

Sorry, this function before accidentally deleted Now re-add back. (:

https://github.com/linuxdeepin/deepin-calculator/commit/405daefde10c3de2ebc0cc679f918c947a93097e

DanyGee commented 6 years ago

Well, something still isn't right :wink: zrzut ekranu deepin_deepin-calculator_20180913190309

liubailin2017 commented 5 years ago

Well, something still isn't right zrzut ekranu deepin_deepin-calculator_20180913190309

where is mistake?

DanyGee commented 5 years ago

How much 30% of 5000 would be? Definately not 000.3 as this magical calculator says :rofl:

tapatoo commented 5 years ago

Wanted to open a bug report since I found deepin-calculator is unable to calculate percentages and seems like there is already one outstanding since 11th of September. This bug renders deeping-calculator unusable in my opinion. Just adding my own screenshot here and off to search for a suitable alternative.

deepinscreenshot_deepin-calculator_20190210231729

ghost commented 5 years ago

Something like this:

30% = 30/100 = 0.3.

What you want to do is:

5000 - (5000 * 0.3)

DanyGee commented 5 years ago

@cephalopodluke I know what I want to do. The question is: Does the maintainer know how to properly implement it? When I type 5000 - 30% I expect the result to be 3500 (5000 - 1500 = 3500). e4f91d37-026a-44d0-91ea-b26cfdaa34a7-7692d7fb-cede-4c34-947c-12129a06b524-v1

DanyGee commented 5 years ago

Dozens of other calculators deal with it flawlessly.

dylskiMarcin commented 5 years ago

Linked article describes how % operator should behave in calculator. https://devblogs.microsoft.com/oldnewthing/20080110-00/?p=23853

adrienluitot commented 4 years ago

Couldn't be % for modulo instead of percentage ? :thinking:

dylskiMarcin commented 4 years ago

Couldn't be % for modulo instead of percentage ? :thinking:

Yeah it would be great, but only when we would considering programmer calculator. So far "deepin-calculator" doesn't even support scientific mode, so...

z966768 commented 4 years ago

we have do some work,maybe you can try the latest version

z966768 commented 3 years ago

This issue will be temporarily closed due to no response received. Please reopen the issue if there're any new updates.