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

Rounding adds trailing Zeros to uncertainty #568

Closed
Jackd4w opened this issue Jan 12, 2022 · 4 comments
Closed

Rounding adds trailing Zeros to uncertainty #568

Jackd4w opened this issue Jan 12, 2022 · 4 comments
Assignees
Labels
bug Something isn't working hotfix A change that will be addressed in a hotfix

Comments

@Jackd4w
Copy link

Jackd4w commented Jan 12, 2022

I have just noticed it with integers so far, the number of zeros appended seems to depend on the rounding precission.

This should be a minimal working example:

\documentclass{report}
\usepackage{siunitx}
\sisetup{
    locale = US ,
    uncertainty-mode = separate,
    round-mode = uncertainty,
    round-precision = 2,
}

\begin{document}
\mbox{}\\\\
    Round-precision 2:\\\\
    9:\qty{1677(9)}{\joule}\\\\
    90:\qty{1677(90)}{\joule}\\\\
    900:\qty{1677(900)}{\joule}\\\\
    9000:\qty{1677(9000)}{\joule}\\\\
    \\\\
    Round-precision 3: \\\\
    9:\qty[round-precision = 3]{1677(9)}{\joule}\\\\
    90:\qty[round-precision = 3]{1677(90)}{\joule}\\\\
    900:\qty[round-precision = 3]{1677(900)}{\joule}\\\\
    9000:\qty[round-precision = 3]{1677(9000)}{\joule}\\\\
    \\\\
    Round-precision 4: \\\\
    9:\qty[round-precision = 4]{1677(9)}{\joule}\\\\
    90:\qty[round-precision = 4]{1677(90)}{\joule}\\\\
    900:\qty[round-precision = 4]{1677(900)}{\joule}\\\\
    9000:\qty[round-precision = 4]{1677(9000)}{\joule}\\\\
\end{document}

The code above produces the following output on my machine:

image

I hope this helps :)
Also really nice package!

-Jackd4w

@josephwright
Copy link
Owner

Could you check your siunitx version: I get 'sensible' output with the latest release.

@Jackd4w
Copy link
Author

Jackd4w commented Jan 12, 2022

I am using siunitx 2022-01-05 v3.0.39

@josephwright
Copy link
Owner

OK, I'll look into this: I have a feeling I know where the issue might be.

@josephwright josephwright self-assigned this Jan 12, 2022
@josephwright josephwright added the bug Something isn't working label Jan 12, 2022
@Jackd4w
Copy link
Author

Jackd4w commented Jan 12, 2022

Very nice, thank you so much for your work on these LaTeX packages! :)

@josephwright josephwright added the hotfix A change that will be addressed in a hotfix label Jan 13, 2022
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