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

Mage plugin fails with long decimals #3488

Closed
doloopo opened this issue May 22, 2020 · 4 comments
Closed

Mage plugin fails with long decimals #3488

doloopo opened this issue May 22, 2020 · 4 comments
Labels
Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-PowerToys Run Improved app launch PT Run (Win+R) Window

Comments

@doloopo
Copy link

doloopo commented May 22, 2020

Environment

Windows build number: Windows 10 1909 (build 18363.836)
PowerToys version: v0.18.0
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

Just enter any decimal in PowerToys Run, and add more and more "0" at the end, such as:
0.100000000000000000000, 0.200000000000000000000000

Expected behavior & Actual behavior

The result should be 0.1 when I type 0.100000000000000000000, but not 0.007766279631452241.
image

I know it might be the problem with the datatype float or double, but I cannot really stand the result. I think the datatype should be more ACCURATE.

Screenshots

[Screenshots are in the context.]

@crutkas
Copy link
Member

crutkas commented May 22, 2020

calculations are done by mage right now. doubtful little we can do until #2265

@crutkas
Copy link
Member

crutkas commented May 22, 2020

@MindSkyHost what is the real world scenario where you'd do this type of calculation here

@crutkas crutkas added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-PowerToys Run Improved app launch PT Run (Win+R) Window labels May 22, 2020
@crutkas crutkas changed the title PowerToys Run Caculation Problem Mage plugin fails with long decimals May 22, 2020
@doloopo
Copy link
Author

doloopo commented May 22, 2020

@MindSkyHost what is the real world scenario where you'd do this type of calculation here

It's not only about the problem I mentioned. There's also problems with the meaningful calculations such as that 1 - 9.0 / 10 I want to get the result 0.1 but not 0.09999999999999998. I'm afraid that when the numbers are different the glitches will become big problems.

Also, the glitches will not happend in Listary Beta 6.0.5.16 (the version I'm using).

@crutkas
Copy link
Member

crutkas commented May 27, 2020

moving tracking issue to #3697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
None yet
Development

No branches or pull requests

2 participants