Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powertoys run calculator weird behavior with space-separated thousands #34145

Open
Akatroj opened this issue Aug 4, 2024 · 7 comments
Open
Labels
Cost-Small Small work item - 0-8 hours of work Help Wanted We encourage anyone to jump in on these and submit a PR. Idea-Enhancement New feature or request on an existing product Issue-Bug Something isn't working Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@Akatroj
Copy link

Akatroj commented Aug 4, 2024

Microsoft PowerToys version

0.83.0

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

PowerToys Run

Steps to reproduce

  1. Open powertoys run
  2. Type in 100 500/100 - the result is incorrect (500 instead of 1005)
  3. If we type in 100500/100 (without the separator), we get the correct result - 1005.

I believe this is because the whitespace will be treated as implied multiplication, so the equation becomes 100(500/100) = 500

✔️ Expected Behavior

Whitespace can be used for thousands separator.

According to Wikipedia, space is the internationally recommended thousands separator.

❌ Actual Behavior

Doing calculations with large numbers formatted with whitespace as thousand separator give misleading results.

Other Software

No response

@Akatroj Akatroj added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 4, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@Akatroj Akatroj changed the title Powertoys run calculator weird behavior with space-separated numbers Powertoys run calculator weird behavior with space-separated thousands Aug 4, 2024
@Akatroj
Copy link
Author

Akatroj commented Aug 4, 2024

okay, my issue appears to be a duplicate of #11786 (with more serious consequences than the original issue).

It would probably be resolved by #2265, but I would like to point out, that issue is 4 years old and is blocked by the microsoft calculator team. Looking through all the issues closed as duplicates/contained within #2265, I can see that there are many problems with the current calculator and it doesn't look like microsoft/calculator#526 will happen any time soon, so maybe you could consider some alternative solutions?

@davidegiacometti davidegiacometti added Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface labels Aug 6, 2024
@Jay-o-Way
Copy link
Collaborator

Jay-o-Way commented Aug 10, 2024

Ping @crutkas @ethanfangg @htcfreek
Wanna emphasize the many issue related to the separator char

@Jay-o-Way Jay-o-Way added the Priority-1 Bug that is high priority label Aug 10, 2024
@crutkas
Copy link
Member

crutkas commented Aug 12, 2024

Answer here would be to just remove the whitespace which would be a easy fix. Calc seems to do that.

@crutkas crutkas added Help Wanted We encourage anyone to jump in on these and submit a PR. Cost-Small Small work item - 0-8 hours of work and removed Priority-1 Bug that is high priority Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 12, 2024
@crutkas
Copy link
Member

crutkas commented Aug 12, 2024

@Jay-o-Way, this is different than comma vs period and when people mix and match them.

@Jay-o-Way
Copy link
Collaborator

Jay-o-Way commented Aug 12, 2024

Answer here would be to just remove the whitespace which would be a easy fix. Calc seems to do that.

That changes the current behavior of an implied multiplication.
#BreakingChange

@htcfreek
Copy link
Collaborator

@Jay-o-Way, this is different than comma vs period and when people mix and match them.

@crutkas
What @Jay-o-Way means is that mages interprets space as multiplication: 10 10 is the same as 10*10. Removing all soaces brings the problem to know if it is a thousand separator space or a multiplication space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cost-Small Small work item - 0-8 hours of work Help Wanted We encourage anyone to jump in on these and submit a PR. Idea-Enhancement New feature or request on an existing product Issue-Bug Something isn't working Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
Status: ⚠️Needs Walkthrough
Development

No branches or pull requests

5 participants