{
  "schemaVersion": 1,
  "slug": "self-rising-flour-calculator",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "bff30c2db6a854bf3411feddaf3cf089c9d4b5564355b8b39fe045dc7dabe6b9",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/self-rising-flour-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": "F = 125c; B = 1.5c; S = 0.5c; S_g = 3c",
    "vars": [
      [
        "c",
        "Cups of plain flour"
      ],
      [
        "F",
        "Plain flour (g)"
      ],
      [
        "B",
        "Baking powder (tsp)"
      ],
      [
        "S",
        "Salt (tsp)"
      ],
      [
        "S_g",
        "Salt (g)"
      ]
    ],
    "note": "Per cup: 125 g flour, 1.5 tsp baking powder, 0.5 tsp salt; 1 tsp salt = 6 g."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "return { plainFlourGrams: cups*125, bakingPowderTsp: cups*1.5, saltTsp: cups*0.5, saltGrams: cups*0.5*6 };",
    "inputs": [
      {
        "name": "cups",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 1000,
        "step": 0.25,
        "requiredValue": true
      }
    ],
    "outputs": [
      {
        "name": "plainFlourGrams",
        "precision": 0,
        "unit": "g",
        "trimTrailingZeros": true
      },
      {
        "name": "bakingPowderTsp",
        "precision": 2,
        "unit": "tsp",
        "trimTrailingZeros": true
      },
      {
        "name": "saltTsp",
        "precision": 3,
        "unit": "tsp",
        "trimTrailingZeros": true
      },
      {
        "name": "saltGrams",
        "precision": 2,
        "unit": "g",
        "trimTrailingZeros": true
      }
    ],
    "interpret": null
  }
}
