This is not an answer, but more of a comment to help motivate the question. Apparently the phrasing of the question, as it currently is, is not convincing for many people. However, this is not really related to Quantity
. Perhaps it can be an "answer" in the sense that it provides an alternative to relying on the built-in methods.
Definitions
The values Mathematica has for the electron mass and electronvolt are
eV -> 1.60217656500000003606379190082454356534`7.359612335017222*^-19 Quantity[1, "Joules"]
me -> 9.10938291707429769542081766`7.0617630921243855*^-31 Quantity[1, "Kilograms"]
which corresponds in more usual terms to $\mathrm{eV}=1.602176565(44)\times10^{-19}\mathrm{J}$ and $m_\mathrm{e}=9.109382917(87)\times10^{-31}\mathrm{kg}$. These values are more or less correct, although I'm not sure where they come from since the error on the electron mass is about a fifth as large as that for the most recent NIST recommended value. (The electronvolt value seems good, though.)
For reference, NIST can tell us that the current best values are $\mathrm{eV}=1.602176565(35)\times10^{-19}\mathrm{J}$ and $m_\mathrm{e}=9.10938291(40)\times10^{-31}\mathrm{kg}$, and the coefficient of correlation between these is $r=0.9998$. The latter is critically important because it tells us that these uncertainties actually come from the same source, so if we treat the errors as independent, we will be double-counting. Significance arithmetic has no way to deal with correlated uncertainties, so in my view that is already a good enough reason not to use it for this type of calculation.
Here are the values in code:
mma = {
eV -> 1.60217656500000003606379190082454356534`7.359612335017222*^-19,
me -> 9.10938291707429769542081766`7.0617630921243855*^-31,
c -> 299792458
};
(* padded to 30 places to prevent significance arithmetic from affecting results *)
nist = {
cov[eV, me] -> 0.9998`30 0.00000040`30*^-31 0.000000035`30*^-19,
var[eV] -> (0.000000035`30*^-19)^2, eV -> 1.602176565`30*^-19,
var[me] -> (0.00000040`30*^-31)^2, me -> 9.10938291`30*^-31,
c -> 299792458
};
The expression is this:
expr = (Sqrt[x eV]*Sqrt[2*c^2*me + x eV])/(c^2*me + x eV);
The expectation value
The mean (expected) value of the expression is almost the same whichever set of values we take for the constants:
mmaresult = expr /. mma /. x -> 50*^9
(* -> 0.999999999947777086555... *)
expr /. nist /. x -> 50*^9
(* -> 0.999999999947777086636... *)
We see that the result matches to 18 places. To pre-empt some of the below, this is a symptom of the fact that the expression is not as sensitive to the uncertainty in the constants as Mathematica claims.
For the below, we will use the NIST values.
The uncertainties
Using this package, the "correct" value of the uncertainty is:
Sqrt@PropagateCovariance[expr, {eV, me}, "ExpansionOrder" -> 2] /. nist /. x -> 50*^9
(* -> 5.9845*10^-17 *)
The value can therefore be stated as $0.999999999947777087(60)$.
Given the approximations it makes, the result significance arithmetic should give is:
Sqrt@PropagateCovariance[expr, {eV, me}, "ExpansionOrder" -> 1,
"InitialCovarianceMatrix" -> DiagonalMatrix[{var[eV], var[me]}]
] /. nist /. x -> 50*^9
(* -> 5.1225*10^-18 *)
It corresponds to a value of $0.9999999999477770866(51)$, so the uncertainty is somewhat underestimated. (Actually, the effect of double-counting is not really significant in the first-order expansion.)
The value significance arithmetic actually gives is:
10^-Precision[mmaresult]
(* -> 8.7382*10^-8 *)
In other words, Mathematica would have us believe that the proper result is $1.000000000 (87)$. But, as we have seen, this is not correct, and the uncertainty is overestimated by many orders of magnitude.
Explanation?
This is really just a guess, but significance arithmetic was never intended to be used for this kind of quantitative work. Its main function is to ensure that Mathematica knows when and where it loses precision, so that it can increase the working precision sufficiently to avoid introducing any spurious values into the calculation. For this reason, it may be that significance arithmetic is actually very conservative in certain cases, such as where a first-order approximation is known not to be sufficient. As long as there are no incorrect digits in the result, significance arithmetic can be said to have done its job. And this is certainly the case here, even if the result is not the one we would have wanted.
SetAccuracy
orSetPrecision
to spew more digits. $\endgroup$ElectronMass
- it's tracking precision like it should. $\endgroup$ElectronMass
, though, because of the structure of the expression. I mean, in the real world, I do know the value to a much higher precision, so why doesn't Mathematica? $\endgroup$QuantityUnits`
package or significance arithmetic for careful work where uncertainties need to be carefully considered. $\endgroup$