7

I would like to use numbers in siunitx where the main number and uncertainty have exponents like:

\num{1.1e-2\pm0.1e-2}

However this gives a Misplaced sign token error and I have to first find a common exponent for both quantities and write the exponent in the end:

\num{1.1\pm0.1e-2}

This gives the expected output of 1.1(1) x 10^{-2}.

Is there any configuration option to make the syntax in the first example, or perhaps something with different exponents like \num{1.1e-2\pm1e-3}, equivalent to \num{1.1\pm0.1e-2}?

6
  • siunitx may be instructed to use a specific exponent. If it read value and uncertainty with exponents, it could surely produce what you want, but doesn't do at the moment.
    – Toscho
    Jul 12, 2013 at 17:25
  • @Toscho I would like to be able to specify the format like 1.1(1)e+1 and use exponents for the input number and uncertainty.
    – gypaetus
    Jul 12, 2013 at 19:37
  • 1
    I think, this is a bug. Please report it to @Joseph Wright. Jul 12, 2013 at 22:39
  • 1
    @HenriMenke I have submitted a bug report in the siunitx github site
    – gypaetus
    Jul 13, 2013 at 19:30
  • This is rather a missing feature than a bug. Uncertainties can only be given with the same exponent as the number.
    – Toscho
    Jul 15, 2013 at 19:01

1 Answer 1

2

This is 'status-bydesign': the format used by siunitx for numbers allows for only one exponent. The logic is that a number and it's uncertainly should necessaries have the same exponent, and thus giving two exponents is an error. Adding more flexibility to the current parser is not a realistic option, both for complexity and speed reasons.

There is an open feature request for 'plugable' approach to parsing numbers: I am committed to doing this in principle but currently have no time frame on it (far from trivial work, of which I have lots!).

1
  • If the format of the number is defined with an option like table-format would it be feasible to allow the number and uncertainty to have different exponents?
    – gypaetus
    Aug 11, 2013 at 19:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .