[Tex/LaTex] siunitx with product-units, scientific-notation and exponent-to-prefix

siunitx

When using the siunitx package I have noticed some strange and unwanted behaviour. I was hoping someone can help me determine if this is a bug or I'm just using it incorrectly.

I've created two cases:

\documentclass{article}
\usepackage{siunitx}

\begin{document}

Case one: \SI{0.9x3.5}{\mm}

Case two: \SI[scientific-notation = engineering, exponent-to-prefix]{0.9x3.5}{\mm}

\end{document}

which gives the following output:
siunitx comparison of scientific-notation = engineering, exponent-to-prefix

Clearly, Case two is incorrect. I would expect either 0.9mm x 3.5mm or 900um x 3500um, preferably the former.

I've used the options in Case two as part of the siunitx package options for my document, and the incorrect behaviour occurs throughout my document. I know it is possible, but I'd rather not manually unassert the options for each case where this occurs for the sake of code flexibility.

I'd really appreciate any help or suggestions. Thanks in advance!

Best Answer

At present I think the best I can say here is that the behaviour is 'undefined'. The code to do 'multi-part' units is pretty simple, and doesn't scan over the entire argument to scale numbers 'up front'. What probably should happen is that the unit can only be altered by the first number or there should be a more complete 'up front' scan. Both of those will need me to do some work. (There is quite a bit outstanding: I do intend to do it all!)

What I'm not sure of is what the 'expected' behaviour is here. My understanding of 'engineering' notation is that you take integer representations if possible, so '900 x 10(-3) mm' rather than '0.9 mm' for the first value, which then gets translated to '900 um'. However, the 'standard' output I'd expect for '3.5 mm' on it's own is just that unchanged. SO I'm not quite sure what is 'correct' here.