microsoft / calculator

Windows Calculator: A simple yet powerful calculator that ships with Windows
MIT License
29.47k stars 5.34k forks source link

Option to make exponent divisible by 3 (for metric units reading) #1304

Open uhliksk opened 4 years ago

uhliksk commented 4 years ago

Problem Statement When working with metric units it's usefull to see scientific notation with exponent divisible by 3. Number 3,3898e-4 is not as clear as 338.98e-6 is clearly 338.98µ units.

Evidence or User Insights You can try "1/2950=" in standard or scientific mode to see result. It was discussed in #226 also.

Proposal For calculations in metric units it's better to see results in format similar to T, G, M, k, m, µ, n, etc. units.

Goals User should be able to set exponent divider to make scientific notation easily readable. Default value should by 1 to preserve actual state with ability to enable predefined value 3 (or even other value) to read metric results more easily.

Non-Goals It's not meant to make any kind of units conversion.

Low-Fidelity Concept If exp>0 then exp=int(exp/div)div if exp<0 then exp=int((exp-div+1)/div)div

Requested Assignment If possible, I would like to implement this.

MicrosoftIssueBot commented 4 years ago

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

ghost commented 4 years ago

This pitch looks like it has everything it needs for review. In the meantime, we'll keep this idea open for discussion so the community has the chance to provide feedback. Check out our New Feedback Process for more info on the user-centered process we follow for new feature development.

SaprativRay commented 4 years ago

Instead of calling it "metric units reading", I think the preferred term for numbers in scientific notation with exponents divisible by 3 is 'engineering notation'. I believe an ENG/SCI toggle button is the most appropriate user interface integration for this feature.

uhliksk commented 4 years ago

Instead of calling it "metric units reading", I think the preferred term for numbers in scientific notation with exponents divisible by 3 is 'engineering notation'. I believe an ENG/SCI toggle button is the most appropriate user interface integration for this feature.

Engineering units are also feets, pounds, etc. which are not using metric system. Better to use MET/SCI toggle.

ghost commented 4 years ago

We reviewed the pitch and would love to explore this idea further! The pitch is a great start, but there are still some open questions. I am moving this issue into planning to iron out some of those details and I created calculator-specs/TBD to track progress. A human will follow up with some feedback on your pitch shortly. Keep in mind that not all ideas that make it into the planning phase are guaranteed to make it to release. For more information on next steps, check out our spec workflow.

grochocki commented 4 years ago

Thanks for the idea! It should be pretty straightforward to expose this in Scientific mode, but a couple details to figure out. Some comments:

MovGP0 commented 4 years ago

It's called Engineering Notation and often abbreviated ENG mode on calculators.

Usually there is the option between standard notation (showing integer values for lower values), scientific notation (one digit before the comma) and engineering notation (up to three digits before the comma). Here is an example from the HP Prime calculator:

image

ghost commented 4 years ago

Engineering Notation from Wikipedia:

Engineering notation (often named "ENG" display mode on scientific calculators) differs from normalized scientific notation in that the exponent n is restricted to multiples of 3. Consequently, the absolute value of m is in the range 1 ≤ |m| < 1000, rather than 1 ≤ |m| < 10. Though similar in concept, engineering notation is rarely called scientific notation. Engineering notation allows the numbers to explicitly match their corresponding SI prefixes, which facilitates reading and oral communication. For example, 12.5×10−9 m can be read as "twelve-point-five nanometres" and written as 12.5 nm, while its scientific notation equivalent 1.25×10−8 m would likely be read out as "one-point-two-five times ten-to-the-negative-eight metres".

tuxwurst commented 3 years ago

Exactly what i am lookng for! Even better if the user could input Engineering Notation with alphanumerics as well. Just like: 1k, 5.3M, 2u5

Goofyeet commented 1 year ago

I implemented engineering notation using the advice @grochocki gave. It could be extended to add an 'OFF' option to address #226 as well.

Would I be able to make a pull request for my implementation to be reviewed and merged?

https://github.com/microsoft/calculator/assets/76914681/9cd69755-b0ef-4b25-930a-375d05eeb3b6