josephwright / josephwright/siunitx
Uncertainty rounding for both uncertainties and non-uncertainties in one.
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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