{
  "schemaVersion": 1,
  "slug": "cylinder-volume-calculator",
  "category": "geometry",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "91ba95a6cb00f70981b6d780d166ba843c06d2b707de04dc1b6b5fcab1f18470",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/cylinder-volume-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": "V = πr²h; S = 2πr(r + h); A = 2πrh",
    "vars": [
      [
        "r",
        "Radius (cm)"
      ],
      [
        "h",
        "Height (cm)"
      ],
      [
        "V",
        "Volume (cm³)"
      ],
      [
        "S",
        "Total surface area (cm²)"
      ],
      [
        "A",
        "Lateral area (cm²)"
      ]
    ],
    "note": "r,h in cm; litres = V÷1000; cubic metres = V÷10⁶."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-04",
    "sources": [
      {
        "name": "OpenStax — Geometric formulas",
        "url": "https://openstax.org/books/prealgebra/pages/c-geometric-formulas"
      }
    ],
    "basis": "V = πr²h; closed surface area = 2πr(r + h).",
    "limitations": "Ideal Euclidean shapes; use consistent length units. A diameter is twice the radius.",
    "implementationHash": "91ba95a6cb00f70981b6d780d166ba843c06d2b707de04dc1b6b5fcab1f18470",
    "domain": "math"
  },
  "contract": {
    "compute": "const v = Math.PI*radius*radius*height; return { volume: v, surfaceArea: 2*Math.PI*radius*(radius+height), lateralArea: 2*Math.PI*radius*height, volumeLitres: v/1000, volumeCubicMetres: v/1e6 };",
    "inputs": [
      {
        "name": "radius",
        "type": "number",
        "default": 5,
        "min": 0,
        "max": 1000000000,
        "step": 0.001
      },
      {
        "name": "height",
        "type": "number",
        "default": 20,
        "min": 0,
        "max": 1000000000,
        "step": 0.001
      }
    ],
    "outputs": [
      {
        "name": "volume",
        "precision": 4,
        "unit": "cm³"
      },
      {
        "name": "surfaceArea",
        "precision": 4,
        "unit": "cm²"
      },
      {
        "name": "lateralArea",
        "precision": 4,
        "unit": "cm²"
      },
      {
        "name": "volumeLitres",
        "precision": 6,
        "unit": "L"
      },
      {
        "name": "volumeCubicMetres",
        "precision": 8,
        "unit": "m³"
      }
    ],
    "interpret": null
  }
}
