Skip to content

CLDR-19882 investigate unit conversion rounding - #6257

Draft
macchiati wants to merge 7 commits into
mainfrom
CLDR-19882-Investigate-Unit-Conversion-Rounding
Draft

macchiati wants to merge 7 commits into
mainfrom
CLDR-19882-Investigate-Unit-Conversion-Rounding

Conversation

@macchiati

@macchiati macchiati commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

CLDR-19882

Provides a class for doing full conversion of units, with precision, from unmixed units to mixed or unmixed units.

Uses rationals internally to maintain full precision (like the rest of the CLDR code), but the same structure works with doubles.

See https://docs.google.com/spreadsheets/d/1KrR3cs8Muc8csM4M-gboGiAGzqATsOAc0vce_xDzrPU/ for examples generated by the test code (with -v).

TODO

  • Add converting from mixed units

  • Add converting with fraction digits (not just significant digits)

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@macchiati
macchiati force-pushed the CLDR-19882-Investigate-Unit-Conversion-Rounding branch from d3e1670 to 60f8d22 Compare October 27, 2026 00:03
@jira-pull-request-webhook

Copy link
Copy Markdown

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@macchiati
macchiati marked this pull request as ready for review October 29, 2026 03:03
@younies
younies self-requested a review November 16, 2026 16:59
@macchiati
macchiati marked this pull request as draft November 18, 2026 23:54
@macchiati

Copy link
Copy Markdown
Member Author

Note: adding some people that might be interested, but still draft.

CLDR-19882 Investigate Unit Conversion Rounding

CLDR-19882 Update

CLDR-19882 Fix start points for conversion

CLDR-19882 Tweak for zero

CLDR-19882 Add test for large sig digits

CLDR-19882 Spotless

CLDR-19882 Further refinements

CLDR-19882 spotless

CLDR-19882 Investigate alternatives

CLDR-19822 Tweaks

CLDR-19882 Add inversion support

CLDR-19882 Partial cleanup

CLDR-19882 Minor cleanup.

CLDR-19882 Cleanup

CLDR-19882 Cleanup

CLDR-19882 Rework to use Rationals

CLDR-19882 More cleanup

CLDR-19882 Finish converting to Rationals

CLDR-19882 spotless

CLDR-19882 Cleanup

CLDR-19882 Cleanup

CLDR-19882 Expand testing
@macchiati
macchiati force-pushed the CLDR-19882-Investigate-Unit-Conversion-Rounding branch from d076a60 to 4ece40a Compare November 25, 2026 04:59
@jira-pull-request-webhook

Copy link
Copy Markdown

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

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.

5 participants