You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix for digits="pdf" last error digits 950-999 case #65
If acceptable, I can propose a pull request. There are some modifications to print.R and utils.R. I have added an additional argument, that could facilitate a future extension to asking the PDG number of digits plus an extra offset. This argument does nothing now.
PR welcome. Adding @davidchall to the conversation because he added this functionality. It would be nice to have new tests that fail under the current version and succeed with the fix.
Hi @Enchufa2 - Yes, @alusiani is correct and this was an oversight on my part in #59.
Below I've highlighted the relevant piece of the PDG guidelines:
5.3. Rounding : While the results shown in the Particle Listings are usually exactly those published by the experiments, the numbers that appear in the Summary Tables (means, averages and limits) are subject to a set of rounding rules.
The basic rule states that if the three highest order digits of the error lie between 100 and 354, we round to two significant digits. If they lie between 355 and 949, we round to one significant digit. Finally, if they lie between 950 and 999, we round up to 1000 and keep two significant digits. In all cases, the central value is given with a precision that matches that of the error. So, for example, the result (coming from an average) 0.827 ± 0.119 would appear as 0.83 ± 0.12, while 0.827 ± 0.367 would turn into 0.8 ± 0.4.
The following test case should be updated such that the final expected value is c("0.8", "1.0"):
I want to mention that I do plan to submit a PR. I could not find the time so far because I am too busy with work affairs. But I will submit when I find the time.
Activity
Enchufa2 commentedon Mar 8, 2026
PR welcome. Adding @davidchall to the conversation because he added this functionality. It would be nice to have new tests that fail under the current version and succeed with the fix.
davidchall commentedon Mar 8, 2026
Hi @Enchufa2 - Yes, @alusiani is correct and this was an oversight on my part in #59.
Below I've highlighted the relevant piece of the PDG guidelines:
The following test case should be updated such that the final expected value is
c("0.8", "1.0"):errors/tests/testthat/test-print.R
Lines 48 to 51 in 7ed6c27
alusiani commentedon Mar 17, 2026
I want to mention that I do plan to submit a PR. I could not find the time so far because I am too busy with work affairs. But I will submit when I find the time.
Enchufa2 commentedon Mar 17, 2026
Perfect, thanks!