microsoft / calculator

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

Uncertainty Calculations Within Precise Calculations #1139

Open Adam2611 opened 4 years ago

Adam2611 commented 4 years ago

Problem Statement This calculator does not have ability to compute uncertainties in precise measurements. Scientists/researchers need these to compute very precise measurements.

Evidence or User Insights This would help scientists/researchers/even high school science students with their measurements.

Proposal Create a function/mode that will allow users to input the uncertainties needed for the calculations (absolute/relative)

Low-Fidelity Concept

For example: When multiplying absolute uncertainties: (A +- deltaA) (B+-deltaB) = (A timesB) +- (deltaA/Atimes100%+deltaB/Btimes100%) (0.050 +-0.001) (9.81 +-0.01) = (0.050+- 9.81) (0.001/0.050 times100% + 0.01/9.81 times100%) = (0.050+- 9.81) +-(2.0000% + 0.10194%) = (0.050 9.81) +- (2.10194%) = (0.4905) +- (2.10194%) = (0.4905) +- (0.010310) = (0.49) +- (0.01)

This feature would also have to be linked with significant digits, because uncertainties and sigfigs are closely related.

Requested Assignment

I'm just suggesting this idea. I don't want to implement 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.

Adam2611 commented 4 years ago

here is a website that helps to explain more of the calculations https://sciencing.com/how-to-calculate-uncertainty-13710219.html

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

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/uncertainty 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

We think adding support for uncertainty in calculations is a great addition, and as you point out, similar to #664 for sig fig support. We want to make sure that the spec very crisply defines the deterministic rules for how uncertainty will work. Like sig figs, we believe this feature is best exposed as a setting in scientific mode (as opposed to a new calculator mode). This will require a little more thinking, but we should be able to leverage some of the design improvements introduced in #428 to expose mode-specific settings.

Adam2611 commented 4 years ago

Hi there, I'm a little new at this... I created a spec according to the outline but I'm not sure how to submit it properly. Should I just attach a file here? Do I create a pull request? Any help would be good. Thanks.

grochocki commented 4 years ago

Sorry for the delay here, @Adam2611! I took a quick look at your draft spec, and I think it is pretty strong, but I need to wrap my head around uncertainties a bit more (it has been a while since I had to think in terms of uncertainties and sig figs). I will leave some specific comments in your PR later this week.

One thought -- based on your spec, it seems like sig figs might be a prerequisite. Would you agree? Or do you think it is possible to introduce uncertainty without sig fig support?

Thanks so much for your contribution!

Adam2611 commented 4 years ago

I think you are right... sigfigs should be implemented first or at least along side this feature. This could provide a better 'base/example' for uncertainties. Fundamentally, both features do go hand in hand. However, I do think that implementing uncertainty vs implementing sigfigs will be quite different, espeically in the ui. This is because for sigfigs, the calculator does not need further input beyond the numbers themselves. In uncertainties, the calculator requires the numbers themselves, and additionally, the uncertainties of the inputs.

Thanks!