-
Notifications
You must be signed in to change notification settings - Fork 26
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
Input Data Constraints Table | Significant Digits and Units #868
Comments
Yes, propagating the number of significant digits sounds fine. Since you brought it up, we should actually change the Drasil version to 10% for the uncertainty. 10.0% implies a precision that we don't have. For TNT, I agree that 1.0 makes sense for both options. @elwazana is currently working on fixing the units so that they are consistent. (Discussed in #824.) This means first checking the units in Drasil and then propagating these corrections to the case study version. In all likelihood the mm units in the case study version will be changed to m. |
My current fix to the 10.0% vs 10% discrepancy rounds the uncertainty to an integer if it is equal (approximately because of floats) and leaves it as a float otherwise. Is this desired @JacquesCarette @smiths? This also propagates through all examples and assumes the precision of all 10% uncertainties to be the same. EDIT: If so, since we aren't maintaining caseStudies anymore, this issue can be closed with the merge of |
@samm82, I don't love the solution of casting a float to an integer. It would be better if we rounded the float to zero decimal places, but still considered it a float. I could see a day where we keep track of the number of significant digits and propagate that through calculations, but that is down the road. The rounding should happen at display time. We shouldn't actually change the value, just how it is displayed. |
I found a better solution in (2cb16c6) that involves using the |
The |
What do you think about leaving it for now, as it technically fixes this issue, closing this issue, and creating another for generalizing the precision? @smiths |
I think we should get the opinion of @JacquesCarette before proceeding with the proposed temporary solution. This might be a case where the fix is worse than the original problem. 😄 My concern is that we are introducing something that sets a bad precedent. |
That's why I proposed a separate issue to deal with it, just so we can close this, and so the conversation doesn't drift from the original intention (as it usually does with my issues 😁). This might be a good thing to discuss in the meeting tomorrow. |
As long as the external package seems 'alive', I am fine with using more external resources. And it does seem like a better solution as I completely agree that this is a display-only issue and that internally there should be no casting. |
This is more of a design question - how should we decide the precision of an uncertainty (or any value, potentially)? Should it be passed in explicitly? Should we define an |
I've created a new issue for precision (#1258) so I'm closing this issue. |
Yes, good idea to create a new issue. |
* Updated stable use 10% instead of 10.0% for default uncertainty in GlassBR * Display 10.0% uncertainty as 10%; as per #868 * Improved uncertainty precision implementation * Added Uncertainty.hs * Fixed issues with Uncertainty.hs * Updated Language.Drasil README * Removed extra constructor for Uncertainty * Implemented Uncertainty throughout drasil-lang * Added Uncertainty to Drasil.hs * Added HasUncertainty class * Added constraints in SSD - TODO: Add precision throughout examples * Added default uncertainty and implemented uncertainty throughout examples * Suppressed default-typing warning * Linted GamePhysics UncertQs * Fixed implementation of HasUncertainty with accessor functions * Started moving Uncertainty to Core and fixing accessors * Finished fixing lensing for Uncertainty * Linted lenses
Significant Digits
Change Uncertainties in Drasil to 10%Specifying Precision #1258Update significant digits in caseStudies - wait until Differences in Table of Symbols in GlassBR SRS #824Units
(Related to discussion in #824) In Drasil, a and b are given in metres, and in millimetres in caseStudies.
The text was updated successfully, but these errors were encountered: