Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix precision of gallon volume units #1237

Merged
merged 3 commits into from
Apr 7, 2023
Merged

Conversation

alpacat00
Copy link
Contributor

@alpacat00 alpacat00 commented Apr 6, 2023

1. US Gallon is exactly 3.785411784 liters regarding to sources:

2. Imperial Gallon is exactly 4.54609 liters regarding to sources:

  • wikipedia.

  • wolfram alpha:

    Previous value (4.54609000000181429905810072407) has problably had some incorrect residue from some calculations.

It looks like all of the unit tests are still passing after these changes.

Copy link
Owner

@angularsen angularsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix, thanks. Just a minor suggestion.

Common/UnitDefinitions/Volume.json Show resolved Hide resolved
@alpacat00 alpacat00 requested a review from angularsen April 7, 2023 02:20
@angularsen angularsen changed the title Fixing precision for volume units (gallons) Fix precision of gallon volume units Apr 7, 2023
@angularsen angularsen merged commit 11b8373 into angularsen:master Apr 7, 2023
@angularsen
Copy link
Owner

Nice job, nuget should be out shortly.
Release UnitsNet/5.11.0 · angularsen/UnitsNet

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.

2 participants