-
Notifications
You must be signed in to change notification settings - Fork 6.5k
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 - Unit Conversion: Preserve all significant figures from the integer part of the result #25789
Comments
go for it @PesBandi ! |
Hi @ethanfangg, should I just remove the |
I agree with the author here that we should "preserve at least all significant figures from the integer part of the result" plus minimum maybe 2 decimals. Additionally, for irrational numbers, or results that would exceed the number of characters we would typically show (say 14 for example), then we should include an ellipses. The copy action should attempt to be as accurate as possible within the bounds of not copying infinitely long numbers, again here maybe limited to a certain character amount. At minimum here, I would like to get rid of mis-leading behavior around rounding and instead show ellipses and/or additional sig figs. |
Hi @ethanfangg, thanks for the quick response.
|
Another thing to consider is adding an ellipsis to scientific notation. |
Description of the new feature / enhancement
Currently, the unit conversion plugin in PowerToys Run forces the rounding of results to 5 significant figures (UnitHandler.cs:107). Even though it seems that this behavior is by design (UnitHandlerTest.cs:106), I believe it can cause trouble for results that do have more significant figures in their integer part.
For example, it can be expected for queries
%% 1234567 m to cm
and%% 1 MiB to Bytes
to produce results123456700 cm
and1048576 Bytes
respectively. But the actual results from the tool are rounded to123460000 cm
and1048600 Bytes
, which is especially unfortunate for the latter case.Therefore, I propose that we preserve at least all significant figures from the integer part of the result, and then probably more from the decimal part. Alternatively, a switch or query parameter can be implemented to skip the rounding all together. It can also be desirable to be able to configure how many significant figures to preserve when rounding does happen (maybe I'm asking for too much here).
Scenario when this would be used?
All unit conversions with a result having a lot of significant digits in the integer part will benefit from this change. Especially for binary (1024-based) data volume conversions, whose results tend to be this way.
Supporting information
No response
The text was updated successfully, but these errors were encountered: