{
  "schemaVersion": 1,
  "slug": "cross-multiply-calculator",
  "category": "math",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "67758485d86f6a1be966b89189d4c1691640207709a790a2c01b929589bceacd",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/cross-multiply-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": "x = b × c ÷ a",
    "vars": [
      [
        "a",
        "Known numerator a"
      ],
      [
        "b",
        "Known denominator b"
      ],
      [
        "c",
        "Known numerator c"
      ]
    ],
    "note": "Requires nonzero a, b, and c for a unique missing denominator; x = b × c ÷ a. Ratio a ÷ b is defined when b ≠ 0; cross-multiplication product = b × c."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const ratioAB=b!==0?a/b:null; if(a===0||b===0||c===0)return {x:null,crossProduct:b*c,ratioAB}; return {x:b*c/a,crossProduct:b*c,ratioAB};",
    "inputs": [
      {
        "name": "a",
        "type": "number",
        "default": 5,
        "min": -1000000000,
        "max": 1000000000,
        "step": 0.01
      },
      {
        "name": "b",
        "type": "number",
        "default": 8,
        "min": -1000000000,
        "max": 1000000000,
        "step": 0.01
      },
      {
        "name": "c",
        "type": "number",
        "default": 20,
        "min": -1000000000,
        "max": 1000000000,
        "step": 0.01
      }
    ],
    "outputs": [
      {
        "name": "x",
        "precision": 4,
        "unit": "",
        "optional": true
      },
      {
        "name": "crossProduct",
        "precision": 4,
        "unit": ""
      },
      {
        "name": "ratioAB",
        "precision": 6,
        "unit": "",
        "optional": true
      }
    ],
    "interpret": null
  }
}
