9

I would like to have uncertainties of zero (variance estimates) displayed:

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\num[separate-uncertainty=true]{1 +- 0.0}
\end{document}

Actual rendering:

Hoping for:

 1±0.0
  • 5
    I don't exactly remember the rules, but the number of decimal places should be the same: {1.0+-0.0} instead of {1+-0.0}. – campa Apr 7 '17 at 10:30
  • 1
    I do not know if what you are doing is wrong, but I found this in the manual: \num[separate-uncertainty = true]{1.234(5)} – hpekristiansen Apr 7 '17 at 10:32
  • @campa I see, \num[separate-uncertainty=true]{1.0 +- 0.0} works, but \num[separate-uncertainty=true]{1 +- 0} does not (no display at all?) – mrcalvin Apr 7 '17 at 11:11
  • 1
    @hpekristiansen I am aware of that notational alternatives. Interestingly \num[separate-uncertainty=true]{1(0)} is ok, while {1 +- 0} is not? \num[separate-uncertainty=true]{1.0(0)} works also; \num[separate-uncertainty=true]{1.0(0.0)} does not, \num[separate-uncertainty=true]{1(0.0)} also renders void. – mrcalvin Apr 7 '17 at 11:15
9

A correct syntax consists in writing the uncertainty as an integer between parentheses. This is interpreted as a number with a decimal part having as many digits as the ‘main’ number.

Demo:

\documentclass{article}
\usepackage{siunitx}
\begin{document}

\sisetup{separate-uncertainty=true}
\begin{tabular}{ll}
  \num{1.00 (10)} & \num{1.00 (2)} \\[2ex]
  \num{1.0 (10)} & \num{1.0 (2)} \\[2ex]
  \num{1 (10)} & \num{1 (2)}
\end{tabular}

\end{document} 

enter image description here

  • +1 You should show this working with a zero uncertainty. – Andrew Swann Apr 7 '17 at 12:05
  • @Andrew Swann: Well, what happens, except an absurd uncertainty of $\pm0$? – Bernard Apr 7 '17 at 12:11
  • 1
    Indeed it is absurd, but it was the OP is asking for. – Andrew Swann Apr 7 '17 at 12:12
  • 7
    I agree with the absurdity of zero uncertainty, but the OP's code \num[separate-uncertainty=true]{1 +- 0.0} works for any uncertainty other than 0, e.g. \num[separate-uncertainty=true]{1 +- 0.1} so with the syntax the OP is using things go wrong specifically when the uncertainty is specified as 0 using a different number of decimal points (\num[separate-uncertainty=true]{1.0 +- 0.0} also works fine for example) – Dai Bowen Apr 7 '17 at 13:04
  • 2
    a) as @DaiBowen points out, this is about inconsistent behavior and b) whether a zero uncertainty is absurd or not is to be judged in the context of reporting. – mrcalvin Apr 7 '17 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.