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

number calculation error in powertoys run #28085

Open
zsynacl opened this issue Aug 22, 2023 · 8 comments
Open

number calculation error in powertoys run #28085

zsynacl opened this issue Aug 22, 2023 · 8 comments
Labels
Area-Quality Stability, Performance, Etc. External Dependency This bug or feature isn't resolved, but it's following an external work item. Issue-Bug Something isn't working Priority-1 Bug that is high priority Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@zsynacl
Copy link

zsynacl commented Aug 22, 2023

Microsoft PowerToys version

0.72.0

Installation method

GitHub, PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

  1. activate power toys run by key shortcut
  2. enter =2^50

✔️ Expected Behavior

expected answer is 1125899906842624

❌ Actual Behavior

actual answer is 1125899906842620

actually, any answer of 2^x would not be multiply of 10.
under any x >= 50, answer from powertoys run will be a wrong answer.
I guess the floating-point number introduced errors.
But if the error could not be avoided, users should be notified explicitly on the UI.

Other Software

windows calculator(11.2210.0.0): 1,125,899,906,842,624

python 3.8.10: python -c "print(2**50)" shows 1125899906842624

@zsynacl zsynacl added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 22, 2023
@Jay-o-Way Jay-o-Way added Area-Quality Stability, Performance, Etc. Run-Plugin Things that relate with PowerToys Run's plugin interface and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 22, 2023
@GhostVaibhav
Copy link
Contributor

I think this is an issue with the external dependency "Mages" since that is used in the background to compute the result. Mind if you can check @Jay-o-Way?

@Jay-o-Way
Copy link
Collaborator

Possible. But I'm not so familiar with that. @htcfreek works more on Run and its plug-ins. Otherwise I would ping @crutkas for the MS Calc engine issue.

@GhostVaibhav
Copy link
Contributor

I guess, now you pinged both😅

@htcfreek
Copy link
Collaborator

This os caused by the number format used in mages.

@GhostVaibhav
Copy link
Contributor

@htcfreek Can you add the "External Dependency" label?

@Jay-o-Way Jay-o-Way added the External Dependency This bug or feature isn't resolved, but it's following an external work item. label May 31, 2024
@crutkas
Copy link
Member

crutkas commented May 31, 2024

This is still mage, this is a signed vs unsigned issue.

@mrbeardad
Copy link

Maybe the calculator use the double float instead of big int
image

@mrbeardad
Copy link

It is very very very difficult to troubleshoot problems caused by calculator errors!!!! I think the calculator should be disabled until the bug has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Quality Stability, Performance, Etc. External Dependency This bug or feature isn't resolved, but it's following an external work item. Issue-Bug Something isn't working Priority-1 Bug that is high priority Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
Status: No status
Development

No branches or pull requests

6 participants