Skip to content

[change] rounding model #85

Merged
Mc-Zen merged 6 commits into
mainfrom
rounding-overhaul
Jun 3, 2026
Merged

[change] rounding model #85
Mc-Zen merged 6 commits into
mainfrom
rounding-overhaul

Conversation

@Mc-Zen

@Mc-Zen Mc-Zen commented May 8, 2026

Copy link
Copy Markdown
Owner

This breaking change improves the design of the rounding model implemented in Zero to better conceptually mirror applications that mix values with and without uncertainties.

First and foremost, rounding of values with and without uncertainty is now separated by default. In the case that an uncertainty is present, what one usually wants is to round the value to the same digit as the uncertainty. This behavior is engaged by setting round.follow-uncertainty to true (which is the default). In this setting and optionally, the round.uncertainty-precision can be used to control the number of significant digits to round the uncertainty to before rounding the value.

If round.follow-uncertainty is false or the number just has no uncertainty, the normal rounding method applies. In this case, there is of course no guarantee that value and uncertainty have the same number of digits.

With this change the option round.mode: "uncertainty" is removed and replaced by the new parameters.

Mc-Zen and others added 4 commits May 8, 2026 08:49
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@Mc-Zen Mc-Zen changed the title [change] rounding [change] rounding model May 8, 2026
@Mc-Zen Mc-Zen merged commit f139a40 into main Jun 3, 2026
1 check passed
@Mc-Zen Mc-Zen deleted the rounding-overhaul branch June 3, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant