Repository navigation
Fix the root unit definitions of the US hundredweight and the kilopond - #142
Merged
Merged
Conversation
NISTu230 "hundredweight (short, 100 lb)" was defined by a single unprefixed root_units link to NISTu203 "hundredweight (long, 112 lb)", which states 1 cwt (US) = 1 cwt (UK). It now links to NISTu201 (pound, avoirdupois) with the hecto prefix NISTp10_2: 1 cwt (US) = 100 lb. NISTu73 kilopond was defined by an unprefixed link to NISTu196 (gram-force), stating 1 kp = 1 gf. It now carries the kilo prefix NISTp10_3, exactly as NISTu72 kilogram-force does: 1 kp = 1000 gf. Both follow the existing prefixed root_units pattern (NISTu72 kgf, NISTu123 mil, NISTu362 mbar). No identifiers, names, symbols or other units change.
Member
Author
|
@ronaldtse could you take a quick look at this when you have a moment? It corrects two unit definitions in |
ronaldtse
approved these changes
Nov 12, 2026
Contributor
|
Thanks @suleman-uzair ! This looks correct. |
ronaldtse
pushed a commit
to plurimath/plurimath-ts
that referenced
this pull request
Nov 13, 2026
… units The numeric WASM asset is rebuilt from plurimath-numeric d08503f, which adds data-declared quantity kinds and flag-based primary quantities, and bundles the UnitsDB candidate from unitsml/unitsdb#142 plus the local gram-force commit bc089c0: cwt (US) = 100 lb, kp = 1000 gf, and gf = 0.00980665 N. The wasm-bindgen glue is unchanged. The six pinned vector files (417 wires) stay byte-identical. The two register wires whose result changes with the corrected data are listed in the new source profile, which pins each old expectation and supplies the new one; the spec checks both. Do not merge before unitsml/unitsdb#142 is approved and released and the pins are moved to that release.
ronaldtse
pushed a commit
to suleman-uzair/unitsdb-ts
that referenced
this pull request
Nov 13, 2026
Candidate dataset from unitsml/unitsdb#142 (060b566 on main fcc9e41): NISTu230 cwt (US) = hecto-pound and NISTu73 kp = kilo-gram-force. The other 378 units and all other tables are byte-identical to the fcc9e41 projection. The data commit is untagged, so the release-tag provenance test fails until UnitsDB tags a release; do not merge before unitsml/unitsdb#142 is approved and released.
ronaldtse
pushed a commit
to suleman-uzair/unitsdb-ts
that referenced
this pull request
Nov 13, 2026
Adds the gram-force correction (canonical_conversion to the newton, factor 0.00980665; self-reference removed) on top of 060b566. NISTu196, NISTu230 and NISTu73 differ from the fcc9e41 projection; all other records and tables are identical. The data commit is untagged, so the release-tag provenance test fails until UnitsDB tags a release; do not merge before unitsml/unitsdb#142 is approved and released.
ronaldtse
pushed a commit
to unitsml/unitsdb-ts
that referenced
this pull request
Nov 13, 2026
Candidate dataset from unitsml/unitsdb#142 (060b566 on main fcc9e41): NISTu230 cwt (US) = hecto-pound and NISTu73 kp = kilo-gram-force. The other 378 units and all other tables are byte-identical to the fcc9e41 projection. The data commit is untagged, so the release-tag provenance test fails until UnitsDB tags a release; do not merge before unitsml/unitsdb#142 is approved and released.
ronaldtse
pushed a commit
to unitsml/unitsdb-ts
that referenced
this pull request
Nov 13, 2026
Adds the gram-force correction (canonical_conversion to the newton, factor 0.00980665; self-reference removed) on top of 060b566. NISTu196, NISTu230 and NISTu73 differ from the fcc9e41 projection; all other records and tables are identical. The data commit is untagged, so the release-tag provenance test fails until UnitsDB tags a release; do not merge before unitsml/unitsdb#142 is approved and released.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two units in
units.yamlhave a singleroot_unitsentry that gives them the wrong size, so any tool that resolves units throughroot_unitsgets them wrong.US hundredweight (NISTu230). It is named "hundredweight (short, 100 lb)", but its
root_unitsentry points to NISTu203, "hundredweight (long, 112 lb)", at power 1 with no prefix. The data therefore says 100 lb is the same as 112 lb.Kilopond (NISTu73). One kilopond is one kilogram-force, 1000 gram-force. Its
root_unitsentry points to NISTu196 (gram-force) at power 1 with no prefix, which makes 1 kp equal to 1 gf.The change:
No identifiers, names, symbols or other units change. The diff is 7 added lines and 1 changed line.
We found both while comparing the Ruby and Rust UnitsML engines on the same data. A scan of every unit defined by a single
root_unitslink found four. Two are correct (Da to u, Bi to abA), and these two are not.One question for review: writing 100 lb as the pound with the hecto prefix is the smallest change that gives the right size, but it reads oddly. If you would rather express it another way, for example a factor-based conversion, we will change it.
Verification
bundle exec ruby validate_schemas.rbpasses for all seven data files.