# Built-in way to handle uncertainty in measurment and physical constants?

Is there a built-in or fairly elegant way to handle uncertainties in measurement data and/or physical constants?

For instance, the 2010 CODATA for the elementary charge is given as $\mathsf{1.602 176 565(35) \times 10^{19}}\textrm{ C}$, where the $(35)$ represents uncertainly of $\mathsf{0.000 000 035 \times 10^{19}}\textrm{ C}$. Or, in my case the D2 transition in $^9Be^+$ $\nu = \mathsf{31928.7436(40) \times 10^{19}}\textrm{ cm}^{-1}$.

I want to not only specify the uncertainty, but carry it through equations and calculate resultant uncertainties. I don't want to recreate my own system of doing this if there are already functions and notation for doing this.

• Sadly, no. There is this post (Expression of uncertainty in measurement.) but my answer is old, ugly and not full. – Kuba Apr 30 '15 at 10:38
• Maybe Interval will handle your needs on this? Also this might be useful. Same coauthor has these as well, that might give a few ideas either from the basic principles or the underlying code. – Daniel Lichtblau Apr 30 '15 at 13:54

Since Mathematica 12, you can use the new Around function to deal with uncertainties and error propagation. You can even retrieve uncertainties in physical constants, like elementary charge:

Around@@Entity["PhysicalConstant", "ElementaryCharge"][{"Value","StandardUncertainty"}]


Outputting:

$$1.60217663 (4 \pm 8 )\times 10^{-19}\text{C}$$

Or you can define your own value such as the D2 line in your example:

\[Nu] = Around[31928.7436/Quantity[1, "Centimeters"],
0.0040/Quantity[1, "Centimeters"]]*10^19