Repository navigation
Conversation
This branch has not been deployed
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.
The bug
usc::acrewas defined from the US survey chain, so1 * usc::acrewas about 4 ppm larger than the acre NIST defines (43,560 ft² = 10 ch² = 160 rd², 4046.856 422 4 m²). NIST advises against survey-foot definitions after December 31, 2022 except for historic and legacy applications.The change
usc::acreis nowmag<10> * square(chain)on the international chain;usc::sectionstays 640 acres.usc::survey1893::acreandusc::survey1893::sectionkeep the old values for land records made before 2023.test/static/usc_test.cpp: the area block checks the international relations, and the survey ones forsurvey1893.docs/users_guide/systems/yard_pound.mdandCHANGELOG.mdupdated.docs/.index.mdanddocs/.index-pages.mdupdated.NIST check of the rest of
usc_test.cppThe NIST revised unit conversion factors page was read and compared with every relation in the file. Foot, rod, chain, link, mile, fathom, acre, square rod, square mile, cable, furlong, league and acre-foot agree with it. The acre-foot volume assertion was changed from
acre * survey1893::us_survey_foottoacre * foot. The page does not list inch, yard, nautical mile, fluid, dry, mass, pressure or temperature units, so those relations are not checked against NIST here; they were left as they were.Testing
g++ -std=c++20 -fsyntax-only -Isrc/core/include -Isrc/systems/include -Isrc/utility/include -Isrc/integrations/include -Itest/static -Itest/runtime test/static/usc_test.cppexits 0 on the fix.usc.hplaced first on the include path fails with'acre' is not a member of 'mp_units::usc::survey1893'.Not run: the Conan/CMake build, the module build, the other compilers, and
pre-commit.Regression test: fails on base twice (/no match for .operator==. .*usc::acre>/), passes on fix twice (
g++ -std=c++20 -fsyntax-only -Isrc/core/include -Isrc/systems/include -Isrc/utility/include -Isrc/integrations/include -Itest/static -Itest/runtime test/static/usc_test.cpp)Fixes #938