Replies: 7 comments
-
Like interval arithmetic? |
Beta Was this translation helpful? Give feedback.
-
Maybe. As mentioned, the error might be defined by min-max bound (using interval arithmetic) or standard deviation (using algebra of random variables). |
Beta Was this translation helpful? Give feedback.
-
It's an interesting idea. I think it's probably a lot of work, and I'm not sure there is a lot of need for it, so I'm not sure if we should implement something like this. First thought: we could implement a new numeric data type which can hold both a numeric value and an error bound. Then, we should implement support for this data type for all functions and operators and correctly propagate error bounds. |
Beta Was this translation helpful? Give feedback.
-
I wonder how many base functions are there in this module? Since most functions are based on other functions and the rest depends on built-in operation in javascript. Still, defining the new type and changing all the typing-related code would be a significant change (I think it's considered a feature, a minor update, but the scale might be equivalent to that of the major release.) |
Beta Was this translation helpful? Give feedback.
-
There is not a clear separation between "base functions" and the rest, many functions are built upon others. Most important base functions are arithmetic functions (about 30 functions) and trigonometric functions (about 30 functions). |
Beta Was this translation helpful? Give feedback.
-
As this is an open-ended proposal rather than a specific actionable issue at this time, moving to Discussions. |
Beta Was this translation helpful? Give feedback.
-
I stumbled across this discussion while looking for support for uncertainty. I'm adding a reference to Julia's Measurements package to this discussion because it is probably a good example to follow. @josdejong I am considering implementing this myself, and I was hoping to do so as an extension first. Please correct me if I am wrong, but it does not appear that we could add an In any case, it probably makes sense to follow your code for complex numbers. Please let me know if you have additional suggestions. |
Beta Was this translation helpful? Give feedback.
-
Since this module supports units and physical constants, which normally contain errors in the value, I'd suggest to implement a numerical type with an error bound (either defined by min-max bound or standard deviation). This might be a very big feature to implement but this issue is opened just in case somebody (including me) want to use it.
Beta Was this translation helpful? Give feedback.
All reactions