Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncertainty rounding with drop-zero-decimal #756

Closed
denisGrBach opened this issue Oct 30, 2024 · 0 comments
Closed

Uncertainty rounding with drop-zero-decimal #756

denisGrBach opened this issue Oct 30, 2024 · 0 comments
Labels
bug Something isn't working hotfix A change that will be addressed in a hotfix

Comments

@denisGrBach
Copy link

The options round-mode=uncertainty and drop-zero-decimal produces unwanted results if a zero decimal place is dropped. I guess the drop-zero-decimal option should be ignored in the given case.

\documentclass[a4paper,11pt]{article}
\usepackage{siunitx}

\begin{document}
\sisetup{separate-uncertainty=true, round-mode=uncertainty, drop-zero-decimal=true}

\noindent
\num[round-precision=2]{-52.11(43)}\\
\num[round-precision=1]{-52.11(43)}\\\\           %works 
%       
\noindent
\num[round-precision=2]{-52.01(43)}\\
\num[round-precision=1]{-52.01(43)}\\\\         %does not work
%
\noindent
\num[round-precision=1, drop-zero-decimal=false]{-52.01(43)}\\  %works again

\end{document}
@josephwright josephwright added bug Something isn't working hotfix A change that will be addressed in a hotfix labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hotfix A change that will be addressed in a hotfix
Projects
None yet
Development

No branches or pull requests

2 participants