{
  "capability_id": "math.special",
  "tool_id": "special-functions",
  "engine": "special-functions",
  "calculation_version": "1.10.0",
  "generated_at": "2026-09-20T09:07:29.782Z",
  "engine_build": "2026-09-20",
  "test_count": 58,
  "passed": 58,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 13,
      "passed": 13
    },
    "boundary": {
      "total": 8,
      "passed": 8
    },
    "property": {
      "total": 37,
      "passed": 37
    }
  },
  "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/special-functions",
  "api": "https://www.calculatorx.com/api/v1/calc/special-functions",
  "schema_input": "https://www.calculatorx.com/schemas/math.special.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.special.output.json",
  "assumptions": [
    "Real argument",
    "Gamma poles at non-positive integers",
    "lgamma is real for x > 0",
    "Bessel J integer n=0…8, |x|≤80",
    "Bessel Y integer n=0…8, x>0",
    "Bessel I integer n=0…8, |x|≤80",
    "Bessel K integer n=0…8, x>0",
    "Lambert W_0 for x ≥ −1/e",
    "Lambert W_{-1} for −1/e ≤ x < 0",
    "Complete Euler B(x,y) for x>0, y>0",
    "Incomplete B_x(a,b) for a>0, b>0, 0≤x≤1",
    "Unnormalized sinc(x)=sin(x)/x, sinc(0)=1",
    "Normalized sinc(x)=sin(πx)/(πx), sinc(0)=1",
    "Not factorial",
    "Not CAS"
  ],
  "limitations": [
    "Real argument only",
    "Not factorial — integer n! stays on math.factorial",
    "Gamma poles at non-positive integers",
    "lgamma is real for x > 0 on this seed",
    "Bessel J / Y / I / K integer n=0…8, |x|≤80 for J and I, x>0 for Y and K",
    "Lambert W_0 for x ≥ −1/e; W_{-1} for −1/e ≤ x < 0",
    "Complete Euler B(x,y) for x>0, y>0; incomplete B_x(a,b) for a>0, b>0, 0≤x≤1",
    "Unnormalized sinc(x)=sin(x)/x and normalized sinc(x)=sin(πx)/(πx), both with sinc(0)=1",
    "unknown mode (including cas, factorial) → INVALID_MODE"
  ],
  "boundary_conditions": [
    "non-finite x → INVALID_NUMBER",
    "Gamma at 0, −1, −2, … → INVALID_INPUT",
    "lgamma with x ≤ 0 → INVALID_INPUT",
    "Bessel n not in 0…8 or |x|>80 → INVALID_INPUT",
    "Y_n or K_n with x ≤ 0 → INVALID_INPUT",
    "Lambert W_0 x < −1/e → INVALID_INPUT",
    "Lambert W_{-1} x < −1/e or x ≥ 0 → INVALID_INPUT",
    "Beta x ≤ 0 or y ≤ 0 → INVALID_INPUT",
    "Incomplete beta a ≤ 0, b ≤ 0, or x ∉ [0,1] → INVALID_INPUT",
    "unknown mode → INVALID_MODE"
  ],
  "sources": [
    "ISO 80000-2:2019 Quantities and units — Mathematics"
  ],
  "methods": [],
  "fingerprint": "sha256:51533eecfeaa78ed9a19aecf37760944d857b430aa676bef46b8f89b684f96af",
  "tests": [
    {
      "id": "golden-erf-1",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "erf",
        "x": 1
      },
      "expect": {
        "value": 0.84270079295
      },
      "expectWarning": null,
      "actual": {
        "mode": "erf",
        "x": 1,
        "value": 0.84270079295,
        "erf": 0.84270079295,
        "erfc": 0.15729920705,
        "formula": "erf(x) = (2/√π) ∫₀ˣ e^{−t²} dt"
      },
      "tol": null
    },
    {
      "id": "golden-gamma-half",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "gamma",
        "x": 0.5
      },
      "expect": {
        "value": 1.77245385091
      },
      "expectWarning": null,
      "actual": {
        "mode": "gamma",
        "x": 0.5,
        "value": 1.77245385091,
        "gamma": 1.77245385091,
        "formula": "Γ(x) = ∫₀^∞ t^{x−1} e^{−t} dt"
      },
      "tol": null
    },
    {
      "id": "golden-gamma-6",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "gamma",
        "x": 6
      },
      "expect": {
        "value": 120
      },
      "expectWarning": null,
      "actual": {
        "mode": "gamma",
        "x": 6,
        "value": 120,
        "gamma": 120,
        "formula": "Γ(x) = ∫₀^∞ t^{x−1} e^{−t} dt"
      },
      "tol": null
    },
    {
      "id": "golden-j0-1",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "bessel_j",
        "n": 0,
        "x": 1
      },
      "expect": {
        "value": 0.765197686558,
        "n": 0,
        "algorithm": "series"
      },
      "expectWarning": null,
      "actual": {
        "mode": "bessel_j",
        "n": 0,
        "x": 1,
        "value": 0.765197686558,
        "formula": "J_n(x) = (x/2)^n Σ_k (−1)^k (x/2)^{2k} / (k! (n+k)!)",
        "algorithm": "series"
      },
      "tol": null
    },
    {
      "id": "golden-w-e",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "lambert_w",
        "x": 2.718281828459045
      },
      "expect": {
        "value": 1,
        "branch": 0,
        "algorithm": "halley"
      },
      "expectWarning": null,
      "actual": {
        "mode": "lambert_w",
        "x": 2.718281828459045,
        "value": 1,
        "branch": 0,
        "formula": "W(x) e^{W(x)} = x",
        "algorithm": "halley"
      },
      "tol": null
    },
    {
      "id": "golden-b23",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "beta",
        "x": 2,
        "y": 3
      },
      "expect": {
        "value": 0.0833333333333,
        "algorithm": "lgamma"
      },
      "expectWarning": null,
      "actual": {
        "mode": "beta",
        "x": 2,
        "y": 3,
        "value": 0.0833333333333,
        "formula": "B(x, y) = Γ(x)Γ(y) / Γ(x+y)",
        "algorithm": "lgamma"
      },
      "tol": null
    },
    {
      "id": "golden-sinc-0",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "sinc",
        "x": 0
      },
      "expect": {
        "value": 1,
        "algorithm": "unnormalized"
      },
      "expectWarning": null,
      "actual": {
        "mode": "sinc",
        "x": 0,
        "value": 1,
        "formula": "sinc(x) = sin(x)/x,  sinc(0)=1",
        "algorithm": "unnormalized"
      },
      "tol": null
    },
    {
      "id": "golden-y0-1",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "bessel_y",
        "n": 0,
        "x": 1
      },
      "expect": {
        "value": 0.0882569642157,
        "n": 0,
        "algorithm": "series"
      },
      "expectWarning": null,
      "actual": {
        "mode": "bessel_y",
        "n": 0,
        "x": 1,
        "value": 0.0882569642157,
        "formula": "Y_n(x) = (2/π) J_n(x) ln(x/2) − (x/2)^{−n}/π Σ_{k<n} − (x/2)^n/π Σ ψ",
        "algorithm": "series"
      },
      "tol": null
    },
    {
      "id": "golden-i0-1",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "bessel_i",
        "n": 0,
        "x": 1
      },
      "expect": {
        "value": 1.26606587775,
        "n": 0,
        "algorithm": "series"
      },
      "expectWarning": null,
      "actual": {
        "mode": "bessel_i",
        "n": 0,
        "x": 1,
        "value": 1.26606587775,
        "formula": "I_n(x) = (x/2)^n Σ_k (x/2)^{2k} / (k! (n+k)!)",
        "algorithm": "series"
      },
      "tol": null
    },
    {
      "id": "golden-k0-1",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "bessel_k",
        "n": 0,
        "x": 1
      },
      "expect": {
        "value": 0.421024438241,
        "n": 0,
        "algorithm": "series"
      },
      "expectWarning": null,
      "actual": {
        "mode": "bessel_k",
        "n": 0,
        "x": 1,
        "value": 0.421024438241,
        "formula": "K_n(x) = ½ (x/2)^{−n} Σ_{k<n} (−1)^k + (−1)^{n+1} I_n ln(x/2) + (−1)^n ½ (x/2)^n Σ ψ",
        "algorithm": "series"
      },
      "tol": null
    },
    {
      "id": "golden-wm1-01",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "lambert_wm1",
        "x": -0.1
      },
      "expect": {
        "value": -3.57715206396,
        "branch": -1,
        "algorithm": "halley"
      },
      "expectWarning": null,
      "actual": {
        "mode": "lambert_wm1",
        "x": -0.1,
        "value": -3.57715206396,
        "branch": -1,
        "formula": "W_{-1}(x) e^{W_{-1}(x)} = x",
        "algorithm": "halley"
      },
      "tol": null
    },
    {
      "id": "golden-ibeta-half",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "incomplete_beta",
        "x": 0.5,
        "a": 2,
        "b": 3
      },
      "expect": {
        "value": 0.0572916666667,
        "regularized": 0.6875,
        "algorithm": "series"
      },
      "expectWarning": null,
      "actual": {
        "mode": "incomplete_beta",
        "x": 0.5,
        "a": 2,
        "b": 3,
        "value": 0.0572916666667,
        "regularized": 0.6875,
        "formula": "B_x(a, b) = ∫₀ˣ t^{a−1} (1−t)^{b−1} dt",
        "algorithm": "series"
      },
      "tol": null
    },
    {
      "id": "golden-nsinc-half",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "normalized_sinc",
        "x": 0.5
      },
      "expect": {
        "value": 0.636619772368,
        "algorithm": "normalized"
      },
      "expectWarning": null,
      "actual": {
        "mode": "normalized_sinc",
        "x": 0.5,
        "value": 0.636619772368,
        "formula": "sinc(x) = sin(πx)/(πx),  sinc(0)=1",
        "algorithm": "normalized"
      },
      "tol": null
    },
    {
      "id": "boundary-special-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "cas",
        "x": 1
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be erf, erfc, gamma, lgamma, bessel_j, bessel_y, bessel_i, bessel_k, lambert_w, lambert_wm1, beta, incomplete_beta, sinc, or normalized_sinc. Not factorial, not CAS."
    },
    {
      "id": "boundary-gamma-pole",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "gamma",
        "x": 0
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "Γ(x) has poles at 0, −1, −2, …."
    },
    {
      "id": "boundary-y0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "bessel_y",
        "n": 0,
        "x": 0
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "Y_n(x) is real only for x > 0."
    },
    {
      "id": "boundary-i0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "bessel_i",
        "n": 0,
        "x": 81
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "|x| must be ≤ 80 on this seed."
    },
    {
      "id": "boundary-k0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "bessel_k",
        "n": 0,
        "x": 0
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "K_n(x) is real only for x > 0."
    },
    {
      "id": "boundary-wm1",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "lambert_wm1",
        "x": 0
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "W_{-1}(x) is real only for −1/e ≤ x < 0."
    },
    {
      "id": "boundary-ibeta",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "incomplete_beta",
        "x": 1.5,
        "a": 2,
        "b": 3
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "B_x(a, b) is real for 0 ≤ x ≤ 1 on this seed."
    },
    {
      "id": "boundary-nsinc",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "normalized_sinc",
        "x": "Infinity"
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "x must be a finite number."
    },
    {
      "id": "property-erf-1",
      "ok": true,
      "kind": "property",
      "detail": "erf(1)",
      "expect": 0.8427007929497149,
      "actual": 0.84270079295
    },
    {
      "id": "property-erf-odd",
      "ok": true,
      "kind": "property",
      "detail": "erf odd",
      "expect": -0.84270079295,
      "actual": -0.84270079295
    },
    {
      "id": "property-erf-erfc",
      "ok": true,
      "kind": "property",
      "detail": "erf+erfc",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-gamma-6",
      "ok": true,
      "kind": "property",
      "detail": "Γ(6)=5!",
      "expect": 120,
      "actual": 120
    },
    {
      "id": "property-gamma-half",
      "ok": true,
      "kind": "property",
      "detail": "Γ(1/2)=√π",
      "expect": 1.7724538509055159,
      "actual": 1.77245385091
    },
    {
      "id": "property-lgamma-6",
      "ok": true,
      "kind": "property",
      "detail": "ln Γ(6)",
      "expect": 4.787491742782046,
      "actual": 4.78749174278
    },
    {
      "id": "property-j0-0",
      "ok": true,
      "kind": "property",
      "detail": "J_0(0)=1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-j1-1",
      "ok": true,
      "kind": "property",
      "detail": "J_1(1)",
      "expect": 0.440050585745,
      "actual": 0.440050585745
    },
    {
      "id": "property-j1-odd",
      "ok": true,
      "kind": "property",
      "detail": "J_1 odd",
      "expect": -0.440050585745,
      "actual": -0.440050585745
    },
    {
      "id": "property-w0-0",
      "ok": true,
      "kind": "property",
      "detail": "W_0(0)=0",
      "expect": 0,
      "actual": 0
    },
    {
      "id": "property-w-e",
      "ok": true,
      "kind": "property",
      "detail": "W_0(e)=1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-w-identity",
      "ok": true,
      "kind": "property",
      "detail": "W e^W = x",
      "expect": 1,
      "actual": 1.0000000000005973
    },
    {
      "id": "property-beta-11",
      "ok": true,
      "kind": "property",
      "detail": "B(1,1)=1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-beta-half",
      "ok": true,
      "kind": "property",
      "detail": "B(1/2,1/2)=π",
      "expect": 3.141592653589793,
      "actual": 3.14159265359
    },
    {
      "id": "property-beta-sym",
      "ok": true,
      "kind": "property",
      "detail": "B(x,y)=B(y,x)",
      "expect": 0.0833333333333,
      "actual": 0.0833333333333
    },
    {
      "id": "property-sinc-0",
      "ok": true,
      "kind": "property",
      "detail": "sinc(0)=1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-sinc-pi",
      "ok": true,
      "kind": "property",
      "detail": "sinc(π)=0",
      "expect": 0,
      "actual": 0
    },
    {
      "id": "property-sinc-even",
      "ok": true,
      "kind": "property",
      "detail": "sinc even",
      "expect": 0.636619772368,
      "actual": 0.636619772368
    },
    {
      "id": "property-y0-1",
      "ok": true,
      "kind": "property",
      "detail": "Y_0(1)",
      "expect": 0.0882569642157,
      "actual": 0.0882569642157
    },
    {
      "id": "property-y1-1",
      "ok": true,
      "kind": "property",
      "detail": "Y_1(1)",
      "expect": -0.7812128213,
      "actual": -0.7812128213
    },
    {
      "id": "property-i0-0",
      "ok": true,
      "kind": "property",
      "detail": "I_0(0)=1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-i0-1",
      "ok": true,
      "kind": "property",
      "detail": "I_0(1)",
      "expect": 1.26606587775,
      "actual": 1.26606587775
    },
    {
      "id": "property-i1-odd",
      "ok": true,
      "kind": "property",
      "detail": "I_1 odd",
      "expect": -0.565159103992,
      "actual": -0.565159103992
    },
    {
      "id": "property-k0-1",
      "ok": true,
      "kind": "property",
      "detail": "K_0(1)",
      "expect": 0.421024438241,
      "actual": 0.421024438241
    },
    {
      "id": "property-k-recurrence",
      "ok": true,
      "kind": "property",
      "detail": "K_2 = (2/x)K_1 + K_0",
      "expect": 1.624838898635,
      "actual": 1.62483889864
    },
    {
      "id": "property-wm1-branch",
      "ok": true,
      "kind": "property",
      "detail": "W_{-1}(-1/e)=-1",
      "expect": -1,
      "actual": -1
    },
    {
      "id": "property-wm1-m2",
      "ok": true,
      "kind": "property",
      "detail": "W_{-1}(-2/e²)=-2",
      "expect": -2,
      "actual": -2
    },
    {
      "id": "property-wm1-identity",
      "ok": true,
      "kind": "property",
      "detail": "W_{-1} e^{W}=x",
      "expect": -0.1,
      "actual": -0.09999999999980529
    },
    {
      "id": "property-ibeta-0",
      "ok": true,
      "kind": "property",
      "detail": "B_0(a,b)=0",
      "expect": 0,
      "actual": 0
    },
    {
      "id": "property-ibeta-1",
      "ok": true,
      "kind": "property",
      "detail": "B_1(a,b)=B(a,b)",
      "expect": 0.0833333333333,
      "actual": 0.0833333333333
    },
    {
      "id": "property-ibeta-11",
      "ok": true,
      "kind": "property",
      "detail": "B_x(1,1)=x",
      "expect": 0.5,
      "actual": 0.5
    },
    {
      "id": "property-ibeta-half",
      "ok": true,
      "kind": "property",
      "detail": "B_{1/2}(1/2,1/2)=π/2",
      "expect": 1.5707963267948966,
      "actual": 1.57079632679
    },
    {
      "id": "property-ibeta-identity",
      "ok": true,
      "kind": "property",
      "detail": "B_x(a,b)+B_{1-x}(b,a)=B",
      "expect": 0.0833333333333,
      "actual": 0.0833333333334
    },
    {
      "id": "property-nsinc-0",
      "ok": true,
      "kind": "property",
      "detail": "sinc_N(0)=1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-nsinc-1",
      "ok": true,
      "kind": "property",
      "detail": "sinc_N(1)=0",
      "expect": 0,
      "actual": 0
    },
    {
      "id": "property-nsinc-even",
      "ok": true,
      "kind": "property",
      "detail": "sinc_N even",
      "expect": 0.636619772368,
      "actual": 0.636619772368
    },
    {
      "id": "property-nsinc-identity",
      "ok": true,
      "kind": "property",
      "detail": "sinc_N(1/2)=sinc(π/2)",
      "expect": 0.636619772368,
      "actual": 0.636619772368
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 58,
      "total": 58,
      "golden": 13,
      "boundary": 8,
      "property": 37
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-20T07:29:05.922Z",
  "rendered_at": "2026-09-20T09:07:29.782Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.10.0",
    "artifacts": {
      "engine": "1.10.0",
      "page": "1.10.0",
      "capability": "1.10.0",
      "evidence": "1.10.0",
      "input_schema": "1.10.0",
      "output_schema": "1.10.0",
      "mcp_contract": "1.10.0"
    },
    "digests": {
      "input_schema_sha256": "8b9159f42671dafa4cf80275c34395c83fae0f5d0be7dcc2342c329578a66f01",
      "output_schema_sha256": "4240a4b6d19a781570dec236229987f2533d42c9fcadede16a0d5c3c3112d3d9",
      "evidence_sha256": "da24fc6c2b828e49821040d653a1d5da0d5efcecc0e2fe0a174e2c497ca99331",
      "evidence_core_sha256": "da24fc6c2b828e49821040d653a1d5da0d5efcecc0e2fe0a174e2c497ca99331",
      "capability_sha256": "fc9f8e33be4b2172a4d19b01a7c483ebafdd325f4a5ab732f9bb202221228763",
      "engine_sha256": "43bbc25ec362b3f78daa612fef9a96df34206649b79e753faa7f17441d59b17a",
      "mcp_contract_sha256": "bf0dcfcfd80680efd201a229fab7f7a80ba9abbff3bea07815672d1d5cb2435a"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.10.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"
  }
}
