{
  "schemaVersion": 1,
  "slug": "uncooked-to-cooked-rice-calculator",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "ff42a00fa57805be8e02a0a4cec960f8f2bcdc281a94842161e510c2fcac0589",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/uncooked-to-cooked-rice-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "M_c = M_d×f; cups = M_c÷158; srv = M_c÷150; kcal = 3.6M_d",
    "vars": [
      [
        "M_d",
        "Dry rice (g)"
      ],
      [
        "f",
        "Expansion factor"
      ],
      [
        "M_c",
        "Cooked rice (g)"
      ],
      [
        "cups",
        "Cooked cups"
      ],
      [
        "srv",
        "Servings"
      ],
      [
        "kcal",
        "Energy (kcal)"
      ]
    ],
    "note": "Expansion factors are fixed estimates: white 3.0, brown 2.7, basmati 3.2; cooked cup 158 g; serving 150 g; dry rice energy estimate 3.6 kcal/g."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const F = { white:3, brown:2.7, basmati:3.2 }; const cooked = dryGrams*(F[riceType]||3); return { cookedGrams: cooked, cookedCups: cooked/158, servings: cooked/150, calories: dryGrams*3.6 };",
    "inputs": [
      {
        "name": "dryGrams",
        "type": "number",
        "default": 200,
        "min": 0,
        "max": 100000,
        "step": 10
      },
      {
        "name": "riceType",
        "type": "select",
        "default": "white",
        "options": [
          {
            "value": "white"
          },
          {
            "value": "brown"
          },
          {
            "value": "basmati"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "cookedGrams",
        "precision": 0,
        "unit": "g"
      },
      {
        "name": "cookedCups",
        "precision": 2,
        "unit": "cups"
      },
      {
        "name": "servings",
        "precision": 2,
        "unit": ""
      },
      {
        "name": "calories",
        "precision": 0,
        "unit": "kcal"
      }
    ],
    "interpret": null
  }
}
