microsoft / calculator

Windows Calculator: A simple yet powerful calculator that ships with Windows
MIT License
29.64k stars 5.37k forks source link

Calculation error in simple operation with parenteshis #1740

Closed tairosonloa closed 2 years ago

tairosonloa commented 2 years ago

Describe the bug Some simple operations with parenthesis are wrong. For example: 100 * (100 -20) = 8000 but Windows calculator returns 80.

Steps To Reproduce Open the calculator, I tried in scientific mode. Test the above equation from the keyboard, keys: 1, 0, 0, , (, 1, 0, 0, -, 2, 0, ), intro*

Expected behavior The result should be 8000, not 80

Screenshots image

Device and Application Information

Additional context

Requested Assignment I'm just reporting this problem. I don't want to fix it.

MicrosoftIssueBot commented 2 years ago

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

NaveenHareendra commented 2 years ago

is this problem fixed? I checked it out, when the equal button is clicked I got the correct output... :)

tairosonloa commented 2 years ago

Yep, it's currently working. It looks like I didn't in fact pressed intro key on my keyboard, which it's like clicking in equal button. However, IMHO, I find the UX a bit weird. I think that showing the result of a part of the expression, in place of the whole expression, seems a bit confusing, because some PC calculators will show the entire expression result if the expressions is valid (i.e. doesn't have unclosed parenthesis or so), without need for pressing intro or the equal button.