{
  "address": "21db38e59c3d2ffb16295bc62a279386",
  "category": "other",
  "question": "How many L are in 1 gallon (US)?",
  "answer": "3.78541 L",
  "askedBy": {
    "kind": "guest",
    "display": "method deck",
    "stamped": false,
    "id": null
  },
  "answeredBy": "method",
  "madeAt": "2026-09-30T22:39:30.722Z",
  "validUntil": null,
  "validityClass": "forever",
  "sources": [
    {
      "label": "Specifications, Tolerances, and Other Technical Requirements for Weighing and Measuring Devices",
      "url": null
    }
  ],
  "supersedes": null,
  "supersededBy": null,
  "isSeed": false,
  "seedSource": null,
  "seedAttribution": null,
  "duplicateOfQid": null,
  "publishedAt": null,
  "unpublishedAt": null,
  "voteCount": 0,
  "queuedForSubstrate": false,
  "answerMethod": "method",
  "unsourced": false,
  "source": {
    "kind": "standard",
    "value": "NIST Handbook 44 (2026 ed.), Appendix C, General Tables of Units of Measurement, Volume or Capacity",
    "retrieved_utc": "2026-09-30T19:29:48Z"
  },
  "qsha256": "753e22088aa01275bcd797f36093cabeb4ffa133d53b779581cb141e9e58e6df",
  "runOne": null,
  "cardContractVersion": "card_contract/1",
  "deck_id": "method-deck",
  "deck_title": "Method Deck",
  "method": {
    "name": "Volume conversion",
    "version": "1",
    "source_url_or_file": "methods/volume-conversion.cjs",
    "sha256_of_method_file": "e3c1163ee9573e79018d39769f58a80f14b43252c248cb963a16faf76c8933f1"
  },
  "receipt": {
    "inSubstrate": false,
    "local": true,
    "modelCallsAtMint": 0,
    "tokensAtMint": 0
  },
  "method_deck": {
    "inputs": [
      {
        "name": "value",
        "type": "number",
        "unit": "from_unit",
        "required": true,
        "description": "The volume to convert"
      },
      {
        "name": "from_unit",
        "type": "string",
        "required": true,
        "description": "Unit of the input value",
        "enum": [
          "mL",
          "L",
          "tsp",
          "tbsp",
          "fl_oz_us",
          "cup_us",
          "pint_us",
          "quart_us",
          "gallon_us",
          "gallon_uk"
        ]
      },
      {
        "name": "to_unit",
        "type": "string",
        "required": true,
        "description": "Unit to convert into",
        "enum": [
          "mL",
          "L",
          "tsp",
          "tbsp",
          "fl_oz_us",
          "cup_us",
          "pint_us",
          "quart_us",
          "gallon_us",
          "gallon_uk"
        ]
      }
    ],
    "outputs": [
      {
        "name": "result",
        "unit": "to_unit",
        "description": "The converted volume"
      }
    ],
    "steps": [
      "Look up the exact liter-equivalent of from_unit and of to_unit from the US customary / UK table.",
      "Convert the input to liters: liters = value * liters_per(from_unit).",
      "Convert liters to the target unit: result = liters / liters_per(to_unit).",
      "Round result to 6 significant figures."
    ],
    "constants": [
      {
        "name": "mL",
        "value": 0.001,
        "unit": "L",
        "source": 0
      },
      {
        "name": "L",
        "value": 1,
        "unit": "L",
        "source": 0
      },
      {
        "name": "tsp",
        "value": 0.00492892159375,
        "unit": "L",
        "source": 0
      },
      {
        "name": "tbsp",
        "value": 0.01478676478125,
        "unit": "L",
        "source": 0
      },
      {
        "name": "fl_oz_us",
        "value": 0.0295735295625,
        "unit": "L",
        "source": 0
      },
      {
        "name": "cup_us",
        "value": 0.2365882365,
        "unit": "L",
        "source": 0
      },
      {
        "name": "pint_us",
        "value": 0.473176473,
        "unit": "L",
        "source": 0
      },
      {
        "name": "quart_us",
        "value": 0.946352946,
        "unit": "L",
        "source": 0
      },
      {
        "name": "gallon_us",
        "value": 3.785411784,
        "unit": "L",
        "source": 0
      },
      {
        "name": "gallon_uk",
        "value": 4.54609,
        "unit": "L",
        "source": 0
      }
    ],
    "examples": [
      {
        "name": "worked example",
        "inputs": {
          "value": 1,
          "from_unit": "gallon_us",
          "to_unit": "L"
        },
        "expected": {
          "answer": "3.78541 L"
        },
        "check": "By definition 1 US gallon = 3.785411784 L exactly; rounded to 6 significant figures is 3.78541."
      },
      {
        "name": "test vector: cups to fluid ounces",
        "inputs": {
          "value": 1,
          "from_unit": "cup_us",
          "to_unit": "fl_oz_us"
        },
        "expected": {
          "answer": "8.00000 fl oz (US)"
        },
        "check": "By hand: 0.2365882365 L / 0.0295735295625 L = 8 exactly, since 1 US cup = 8 US fluid ounces by definition."
      },
      {
        "name": "test vector: UK gallon to liters",
        "inputs": {
          "value": 1,
          "from_unit": "gallon_uk",
          "to_unit": "L"
        },
        "expected": {
          "answer": "4.54609 L"
        },
        "check": "By definition 1 UK (imperial) gallon = 4.54609 L exactly; already 6 significant figures."
      }
    ],
    "disclaimer": null,
    "deck_category": "units"
  },
  "status": "minted",
  "kind": "method",
  "provenanceClass": "own_question",
  "provenance": {
    "schema": "card_provenance/2.0.0",
    "chain": [
      {
        "source": {
          "kind": "standard",
          "value": "NIST Handbook 44 (2026 ed.), Appendix C, General Tables of Units of Measurement, Volume or Capacity",
          "retrieved_utc": "2026-09-30T19:29:48Z"
        },
        "sha256": "c94fb43a2cc523f2dd6676c481fa4bf5a19c6cd8dc4d997262b4ee10f325f1ae",
        "supersedes": null,
        "added_utc": "2026-09-30T22:39:30.722Z",
        "added_by": "method:Volume conversion",
        "why": "the method that computed this answer",
        "check": null,
        "status_label": "pending",
        "signature": null
      }
    ]
  }
}
