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

Mitigate calculator deceiving behavior #22417

Closed
psychopatt opened this issue Dec 2, 2022 · 5 comments
Closed

Mitigate calculator deceiving behavior #22417

psychopatt opened this issue Dec 2, 2022 · 5 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@psychopatt
Copy link

psychopatt commented Dec 2, 2022

Description of the new feature / enhancement

Do not offer a calculator solution when a number in the query doesn't match current locale.

For example, with french regional settings, one is expected to type in 4,017*5863,46 rather than 4.017*5863.46. But for both queries a calculator result is presented... with one dead wrong (screenshots from v0.64.1):

With such settings, it would be less prone to bad surprises to not present the first result at all, and maybe offer to fix the query with a result along the lines of

Did you mean 4,017*5863,46?

which, when selected, would replace the input and then present the (correct) result.

Scenario when this would be used?

This could avoid errors for anyone using the calculator on any computer where the regional settings are different from what one is used to.

Supporting information

This proposal is directly linked to the regional settings mentioned in #19741. The solutions from there (changing system or PT settings) are simple and correct, and the issue is easily worked around.

The problem is that it's taken me months before discovering this issue since even with the "wrong" decimal symbol results are wrong only in some circumstances (leading zeroes afer the decimal point) and correct in all other cases. That makes thoses cases viciously hard to detect (at least to me) and I probably have used false results without noticing it.

@psychopatt psychopatt added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Dec 2, 2022
@Jay-o-Way Jay-o-Way added the Run-Plugin Things that relate with PowerToys Run's plugin interface label Apr 20, 2023
@Jay-o-Way
Copy link
Collaborator

Jay-o-Way commented Apr 20, 2023

Yes, this is a complicated situation. There's a setting that deals with the decimal. Actually, the problem here is that the 0 is trimmed off.
Linking #2265 and #24611
@crutkas @jaimecbernardo @htcfreek we need a fix for this asap. Don't want any buildings crashing down because PowerToys is responsible for bad calculations, or anything like that...

@jaimecbernardo
Copy link
Collaborator

@Jay-o-Way , perhaps we should make the "Use English (United States) number format for input" the default, since it seems that's how people expect it? 🤔

image

@Jay-o-Way
Copy link
Collaborator

Jay-o-Way commented Apr 24, 2023

@jaimecbernardo it's not about the decimal character. The fractional part is converted into a number and the leading zero's get trimmed off.

@crutkas
Copy link
Member

crutkas commented Jul 31, 2023

/dup #2265

@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service microsoft-github-policy-service bot added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
None yet
Development

No branches or pull requests

4 participants