4

I'm trying to to round numbers in latex in a way, such that 1.23456e-10 rounded to two places becomes zero and not 1.23e-10.

One solution with siunitx is

\num[round-mode=places,scientific-notation = fixed,fixed-exponent = 0 ,round-precision = 2]{1.23456e-6}

But if the digits get too many (>10) it fails, with the the error message

! Number too big.

As explained in siunitx number too big when trying to round

the command

\num[round-mode=figures,round-precision=2]{1.0123456789012e-6}

had the same problems, which are fixed now.

But, if I add scientific-notation = fixed, then the error reappears.

Does anybody know a fix for that problem?

3
  • 4
    I'd suggest reporting it in the bug tracker (bitbucket.org/josephwright/siunitx/issues) :-) I have a couple of other issues to look at, so this should be doable by the weekend.
    – Joseph Wright
    May 2, 2012 at 14:04
  • @Joseph: I did. Would be great to see that fixed. Thanks a lot. May 2, 2012 at 14:43
  • 1
    Bug fixed in source, CTAN update later today.
    – Joseph Wright
    May 3, 2012 at 9:36

1 Answer 1

8

Fixed in the current release of siunitx (v2.5c):

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\num
  [
    round-mode          = places,
    scientific-notation = fixed,
    fixed-exponent      = 0,
    round-precision     = 2
  ]{1.2345678901234567890e-6}

\end{document}

You must log in to answer this question.

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