{
  "capability_id": "math.numerical.interpolate",
  "tool_id": "numerical-interpolation",
  "engine": "numerical-interpolation",
  "calculation_version": "1.1.0",
  "generated_at": "2026-09-19T02:14:29.321Z",
  "engine_build": "2026-09-19",
  "test_count": 13,
  "passed": 13,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 4,
      "passed": 4
    },
    "boundary": {
      "total": 2,
      "passed": 2
    },
    "property": {
      "total": 7,
      "passed": 7
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": false,
  "review_kind": null,
  "source_checked": true,
  "reviewed_by": null,
  "reviewer_role": null,
  "last_reviewed": null,
  "expert_review": {
    "status": "optional_not_performed",
    "reviewer": null,
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "note": "Domain expert review is optional under CVP (CVP-EXP-01). Absence does not block CVP Verified. See Review policy for supplemental domain assurance."
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/math/numerical-interpolation",
  "api": "https://www.calculatorx.com/api/v1/calc/numerical-interpolation",
  "schema_input": "https://www.calculatorx.com/schemas/math.numerical.interpolate.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.numerical.interpolate.output.json",
  "assumptions": [
    "Unique x; sorted internally",
    "Natural spline ends, not clamped",
    "Not Akima / PCHIP / regression / CAS"
  ],
  "limitations": [
    "Not Akima, PCHIP, clamped spline, or statistical regression",
    "Linear/spline x outside the table without extrapolate → VALUE_OUT_OF_RANGE",
    "Lagrange limited to 9 points (degree ≤ 8); linear/spline table ≤ 100",
    "Not a second interpolator and not CAS"
  ],
  "boundary_conditions": [
    "x outside table without extrapolate → VALUE_OUT_OF_RANGE",
    "duplicate x → INVALID_INPUT",
    "unknown method (including akima) → INVALID_MODE"
  ],
  "sources": [
    "ISO 80000-2:2019 Quantities and units — Mathematics"
  ],
  "methods": [],
  "fingerprint": "sha256:04761ef110e87c6f4f6ebc725d35dd25017d0474ed8a93ffe43a1f4d7e448d72",
  "tests": [
    {
      "id": "golden-linear-mid",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "method": "linear",
        "points": "0,0; 10,20",
        "x": 5
      },
      "expect": {
        "y": 10
      },
      "expectWarning": null,
      "actual": {
        "method": "linear",
        "x": 5,
        "y": 10,
        "n": 2,
        "x_min": 0,
        "x_max": 10,
        "in_range": true,
        "extrapolated": false,
        "formula": "y = y₀ + (y₁−y₀)(x−x₀)/(x₁−x₀)",
        "interval": [
          0,
          10
        ],
        "points": [
          {
            "x": 0,
            "y": 0
          },
          {
            "x": 10,
            "y": 20
          }
        ]
      },
      "tol": 1e-12
    },
    {
      "id": "golden-lagrange-x2",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "method": "lagrange",
        "points": [
          [
            0,
            0
          ],
          [
            1,
            1
          ],
          [
            2,
            4
          ]
        ],
        "x": 1.5
      },
      "expect": {
        "y": 2.25
      },
      "expectWarning": null,
      "actual": {
        "method": "lagrange",
        "x": 1.5,
        "y": 2.25,
        "n": 3,
        "x_min": 0,
        "x_max": 2,
        "in_range": true,
        "extrapolated": false,
        "formula": "Lagrange polynomial through the given points",
        "points": [
          {
            "x": 0,
            "y": 0
          },
          {
            "x": 1,
            "y": 1
          },
          {
            "x": 2,
            "y": 4
          }
        ]
      },
      "tol": 1e-12
    },
    {
      "id": "golden-spline-mid",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "method": "spline",
        "points": "0,0; 1,1; 2,0",
        "x": 0.5
      },
      "expect": {
        "y": 0.6875
      },
      "expectWarning": null,
      "actual": {
        "method": "spline",
        "x": 0.5,
        "y": 0.6875,
        "n": 3,
        "x_min": 0,
        "x_max": 2,
        "in_range": true,
        "extrapolated": false,
        "formula": "natural cubic spline (S″=0 at ends)",
        "points": [
          {
            "x": 0,
            "y": 0
          },
          {
            "x": 1,
            "y": 1
          },
          {
            "x": 2,
            "y": 0
          }
        ]
      },
      "tol": 1e-12
    },
    {
      "id": "golden-spline-2pt",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "method": "spline",
        "points": "0,0; 10,20",
        "x": 5
      },
      "expect": {
        "y": 10
      },
      "expectWarning": null,
      "actual": {
        "method": "spline",
        "x": 5,
        "y": 10,
        "n": 2,
        "x_min": 0,
        "x_max": 10,
        "in_range": true,
        "extrapolated": false,
        "formula": "natural cubic spline (S″=0 at ends)",
        "points": [
          {
            "x": 0,
            "y": 0
          },
          {
            "x": 10,
            "y": 20
          }
        ]
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-out-of-range",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "method": "linear",
        "points": "0,0; 10,20",
        "x": -1
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "x must be in [0, 10] (or set extrapolate=true)."
    },
    {
      "id": "boundary-akima",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "method": "akima",
        "points": "0,0; 1,1",
        "x": 0.5
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "method must be linear, lagrange, or spline."
    },
    {
      "id": "property-lerp-mid",
      "ok": true,
      "kind": "property",
      "detail": "linear midpoint",
      "expect": 10,
      "actual": 10
    },
    {
      "id": "property-lerp-node",
      "ok": true,
      "kind": "property",
      "detail": "linear at x0",
      "expect": 0,
      "actual": 0
    },
    {
      "id": "property-lagrange-2pt",
      "ok": true,
      "kind": "property",
      "detail": "lagrange 2-pt = linear",
      "expect": 10,
      "actual": 10
    },
    {
      "id": "property-lagrange-x2",
      "ok": true,
      "kind": "property",
      "detail": "P(x)=x² at 1.5",
      "expect": 2.25,
      "actual": 2.25
    },
    {
      "id": "property-extrapolate",
      "ok": true,
      "kind": "property",
      "detail": "linear extrapolate",
      "expect": 30,
      "actual": 30
    },
    {
      "id": "property-spline-mid",
      "ok": true,
      "kind": "property",
      "detail": "natural spline (0,0)(1,1)(2,0) at 0.5",
      "expect": 0.6875,
      "actual": 0.6875
    },
    {
      "id": "property-spline-line",
      "ok": true,
      "kind": "property",
      "detail": "collinear spline = linear",
      "expect": 1.5,
      "actual": 1.5
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 13,
      "total": 13,
      "golden": 4,
      "boundary": 2,
      "property": 7
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-19T01:46:58.355Z",
  "rendered_at": "2026-09-19T02:14:29.321Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.1.0",
    "artifacts": {
      "engine": "1.1.0",
      "page": "1.1.0",
      "capability": "1.1.0",
      "evidence": "1.1.0",
      "input_schema": "1.1.0",
      "output_schema": "1.1.0",
      "mcp_contract": "1.1.0"
    },
    "digests": {
      "input_schema_sha256": "520b91ca6f72fd59f598a333ae26f1e3266f9c3f01da970ae68e3ced324ccba0",
      "output_schema_sha256": "d6e80d7818c522dea0dd306929f1b4d5ac7c85ec5f6fda46d0659e96eb245cff",
      "evidence_sha256": "d341045357b498c4ec3ca27762a4e2fe457409b93c155d9648eb4c3a9af0e110",
      "evidence_core_sha256": "d341045357b498c4ec3ca27762a4e2fe457409b93c155d9648eb4c3a9af0e110",
      "capability_sha256": "9dd674a07d50eb288975b2c5de30f6499c364ad4593d70223ac621d2c5051afd",
      "engine_sha256": "e2db0a7325e87d733eee5491a146d870677fe7b2ccb5d15ba36a8b5afbb17247",
      "mcp_contract_sha256": "312c860acede70764ad49c5e6180292fe8086ed8874884b9239465a80766d858"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.1.0"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
