josephwright / siunitx

A comprehensive (SI) units package for LaTeX
LaTeX Project Public License v1.3c
361 stars 26 forks source link

Rounding with `round-mode=up` always increases the last figure #742

Closed Mc-Zen closed 3 months ago

Mc-Zen commented 3 months ago

Thank you for this absolutely awesome package. I use it in almost every project.

Today, I noted that when the round-mode is set to up, the last shown figure is always increased by one, independent of whether the the following digits are zero or non-zero.

For example,

\documentclass{article}
\usepackage{siunitx}

\begin{document}
\sisetup{round-precision=2, round-mode=places, round-direction=up}
\num{42.370}
\end{document}

outputs 42.38 instead of 42.37.