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?

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}

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.