Unit conversion from cubic meters to US gallons seems off

Issue #922 resolved
Former user created an issue

Using built in units:

(meter ^ 3) / gallon_US
= 264.20079260237780713342

Using NIST handbook values, 61023.74in^3 per m^3, 231in^3 per gal

61023.74/231
= 264.17203463203463203463

Comments (7)

  1. Pol Welter

    It seems like I forgot to type all the digits...

    UNIT_CACHE(US_gallon,           HNumber("3.785") * liter())
    

    should have been

    UNIT_CACHE(US_gallon,           HNumber("3.785411784") * liter())
    

    Link to the offending source

    For the record though: 1 m³ = 61023.74 in³ is not exact. The exact definition comes from 1 in = 2.54 cm.

  2. Log in to comment