Arithmetic of numbers with error bound
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.
Like interval arithmetic?
Maybe. As mentioned, the error might be defined by min-max bound (using interval arithmetic) or standard deviation (using algebra of random variables).
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.
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.)
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).
As this is an open-ended proposal rather than a specific actionable issue at this time, moving to Discussions.