Skip to content

Fix significant-digit rounding after fractional carry - #1388

Open
vera-rubin wants to merge 1 commit into
python-babel:masterfrom
vera-rubin:fix/significant-digit-carry
Open

vera-rubin wants to merge 1 commit into
python-babel:masterfrom
vera-rubin:fix/significant-digit-carry

Conversation

@vera-rubin

Copy link
Copy Markdown

When significant-digit rounding adds a digit, fractional padding uses the original exponent and inserts an extra zero.
We adjust the padding exponent after a carry so the result keeps its magnitude and required significant digits.
We've added a regression test and verified it with the number formatting tests and doctests.

Fixes #1387

— ChipLab

This branch has not been deployed

No deployments
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.

Significant-digit rounding inserts an extra zero after a fractional carry

1 participant