Let's say I have 2 lists containing items:
Values are stored as exact fractions, and I want to print a combined list of numerical values. For example, if I have 1 list of items:
ExA = {5251/977, 19087/53}; ExB = {53/19087, 977/5251};
I want the output to be: {5.3746 ± 0.0028, 360.13 ± 0.19} using Err[ExA, ExB] .
Basically, I want the uncertainty to have an element accuracy of 2 digits and a value with the same accuracy as the pair uncertainty. At the moment I have:
Err[x_, \[CapitalDelta]x_]:= N[x] \[PlusMinus] NumberForm[N[\[CapitalDelta]x], 2]; SetAttributes[Err, Listable];
Edit: After almost working, as I want:
Err[x_, \[CapitalDelta]x_] := PlusMinus[ NumberForm[N[x], {10, 2 - MantissaExponent[\[CapitalDelta]x][[2]]}], NumberForm[N[\[CapitalDelta]x], 2]] SetAttributes[Err, Listable];
If the uncertainties of the second category are rounded to 0, then a shorter version is used - I do not want this. For example 1.7007 ± 0.006 , where I want 1.7007 ± 0.0060 .