josephwright / josephwright/siunitx

Uncertainty rounding for both uncertainties and non-uncertainties in one.

Open
#654 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TeX
Stars
407
Forks
29
Avg merge
11h 20m
Merged PRs (30d)
3

Description

Split out from #652. Currently a user has to specify if they want the rounding to occur with uncertainty or figures. It would be very convenient if there was another rounding option smart that takes into consideration whether an uncertainty was provided. I could do something like:

\sisetup{ uncertainty-mode = separate, exponent-mode = scientific, round-mode = smart, }
\SI[round-precision=4]{3031523.20585698(74336.4927580466)}{\meter\per\second}

to get the equivalent of. Similarly

\SI{round-precision=3}{299 792 458 }{\meter\per\second} 

As it stands currently, if we use \sisetup{round-mode=uncertainty}, the second number fails to round to 3 significant digits and just prints out the same value.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how \sisetup handles round-mode, uncertainty-mode, and round-precision for the \SI command. Check the existing rounding behavior for values with and without uncertainties. Done means a smart rounding mode selects uncertainty rounding when uncertainty is present and significant-figure rounding otherwise, matching both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.