Skip to content

[change] rounding model #85

Open
Mc-Zen wants to merge 4 commits intomainfrom
rounding-overhaul
Open

[change] rounding model #85
Mc-Zen wants to merge 4 commits intomainfrom
rounding-overhaul

Conversation

@Mc-Zen
Copy link
Copy Markdown
Owner

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

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
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