{
  "capability_id": "math.root",
  "tool_id": "root",
  "engine": "root",
  "calculation_version": "1.0.5",
  "generated_at": "2026-09-16T22:03:43.777Z",
  "engine_build": "2026-09-10",
  "test_count": 24,
  "passed": 24,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 10,
      "passed": 10
    },
    "boundary": {
      "total": 14,
      "passed": 14
    },
    "property": {
      "total": 0,
      "passed": 0
    }
  },
  "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/root",
  "api": "https://www.calculatorx.com/api/v1/calc/root",
  "schema_input": "https://www.calculatorx.com/schemas/math.root.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.root.output.json",
  "assumptions": [
    "Real principal root only. This engine does not return complex values.",
    "Index n is a positive safe integer (1st, square, cube, 4th, …, nth root). Generalized powers a^(1/n) with non-integer, negative, or non-safe-integer n belong on the Exponent calculator.",
    "Even n requires a ≥ 0 and returns b ≥ 0. Odd n allows a < 0 (for example ∛(−8) = −2).",
    "n = 2 uses Math.sqrt. n = 3 uses Math.cbrt, returning an implementation-approximated binary64 result (including negatives). Other n use a^(1/n) for a ≥ 0, or −(|a|)^(1/n) for odd n and a < 0.",
    "The Square Root calculator is a different contract: √(x<0) returns the principal imaginary. This page rejects that case as NOT_REAL."
  ],
  "limitations": [
    "n must be a positive safe integer → INVALID_INDEX",
    "Even roots of a < 0 → NOT_REAL (unlike square-root imaginary)",
    "Missing a → MISSING_REQUIRED_INPUT"
  ],
  "boundary_conditions": [
    "Missing a returns MISSING_REQUIRED_INPUT. Missing n defaults to 2.",
    "Non-numeric, object, array, boolean, NaN, or Infinity inputs return INVALID_NUMBER.",
    "n that is not a positive safe integer (including n = 0, n < 0, non-integers such as 2.5, and n outside JavaScript's safe-integer range) returns INVALID_INDEX.",
    "a < 0 with even n returns NOT_REAL.",
    "a = 0 returns 0.",
    "Defensive guards exist for unexpected non-finite numerical outcomes (RESULT_OVERFLOW / RESULT_UNDERFLOW). Overflow or underflow is not expected for valid finite nth-root inputs."
  ],
  "sources": [
    {
      "title": "NIST Digital Library of Mathematical Functions, Chapter 4",
      "section": "Logarithm, Exponential, Powers",
      "url": "https://dlmf.nist.gov/4",
      "supports": "nth root as the principal real value of a^(1/n) when it exists",
      "kind": "reference"
    },
    {
      "title": "NIST DLMF §4.2(iv)",
      "section": "Powers: principal value z^a = exp(a ln z)",
      "url": "https://dlmf.nist.gov/4.2",
      "supports": "Principal a^(1/n) for a > 0. Negative a is restricted here to odd integer n so the result stays the real odd root, not the complex principal power.",
      "kind": "reference"
    },
    {
      "title": "CalculatorX mathematical conventions",
      "section": "Real nth root; even roots of negatives are NOT_REAL; n is a positive safe integer",
      "supports": "Distinct from the Square Root calculator’s principal-imaginary contract for x < 0. Polynomial roots belong on Quadratic. Non-integer or non-safe-integer n is a generalized power (Exponent), not this nth-root contract. Negative odd roots use −(−a)^(1/n).",
      "kind": "definition"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:7faeb383ad7c423d84a64781f249bee383d3304f8f97e3f173f7801b0286e088",
  "tests": [
    {
      "id": "sqrt-16",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 16,
        "n": 2
      },
      "expect": 4,
      "expectWarning": null,
      "actual": 4,
      "tol": 0
    },
    {
      "id": "sqrt-27",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 27,
        "n": 2
      },
      "expect": 5.196152422706632,
      "expectWarning": null,
      "actual": 5.196152422706632,
      "tol": 1e-12
    },
    {
      "id": "cbrt-27",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 27,
        "n": 3
      },
      "expect": 3,
      "expectWarning": null,
      "actual": 3,
      "tol": 0
    },
    {
      "id": "cbrt-neg8",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": -8,
        "n": 3
      },
      "expect": -2,
      "expectWarning": null,
      "actual": -2,
      "tol": 0
    },
    {
      "id": "fourth-16",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 16,
        "n": 4
      },
      "expect": 2,
      "expectWarning": null,
      "actual": 2,
      "tol": 0
    },
    {
      "id": "eighth-15",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 15,
        "n": 8
      },
      "expect": 1.402850552006674,
      "expectWarning": null,
      "actual": 1.402850552006674,
      "tol": 1e-12
    },
    {
      "id": "zero",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 0,
        "n": 2
      },
      "expect": 0,
      "expectWarning": null,
      "actual": 0,
      "tol": 0
    },
    {
      "id": "n-one",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 42,
        "n": 1
      },
      "expect": 42,
      "expectWarning": null,
      "actual": 42,
      "tol": 0
    },
    {
      "id": "default-n",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 16
      },
      "expect": 4,
      "expectWarning": null,
      "actual": 4,
      "tol": 0
    },
    {
      "id": "even-neg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": -9,
        "n": 2
      },
      "expectError": "NOT_REAL",
      "code": "NOT_REAL",
      "error": "Even roots of negative numbers are not real."
    },
    {
      "id": "fourth-neg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": -8,
        "n": 4
      },
      "expectError": "NOT_REAL",
      "code": "NOT_REAL",
      "error": "Even roots of negative numbers are not real."
    },
    {
      "id": "frac-n",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 16,
        "n": 2.5
      },
      "expectError": "INVALID_INDEX",
      "code": "INVALID_INDEX",
      "error": "Root index n must be a positive safe integer (1, 2, 3, …; at most 2^53−1)."
    },
    {
      "id": "n-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 16,
        "n": 0
      },
      "expectError": "INVALID_INDEX",
      "code": "INVALID_INDEX",
      "error": "Root index n cannot be 0."
    },
    {
      "id": "empty-a",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "n": 2
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "Enter a finite radicand a."
    },
    {
      "id": "n-negative",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 16,
        "n": -2
      },
      "expectError": "INVALID_INDEX",
      "code": "INVALID_INDEX",
      "error": "Root index n must be a positive safe integer (1, 2, 3, …; at most 2^53−1)."
    },
    {
      "id": "n-max-safe",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 16,
        "n": 9007199254740991
      },
      "expect": 1,
      "expectWarning": null,
      "actual": 1.0000000000000002,
      "tol": 1e-12
    },
    {
      "id": "n-unsafe",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 16,
        "n": 9007199254740992
      },
      "expectError": "INVALID_INDEX",
      "code": "INVALID_INDEX",
      "error": "Root index n must be a positive safe integer (1, 2, 3, …; at most 2^53−1)."
    },
    {
      "id": "frac-neg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": -8,
        "n": 0.5
      },
      "expectError": "INVALID_INDEX",
      "code": "INVALID_INDEX",
      "error": "Root index n must be a positive safe integer (1, 2, 3, …; at most 2^53−1)."
    },
    {
      "id": "a-object",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": {},
        "n": 2
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "n-array",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 16,
        "n": []
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "n-boolean",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 16,
        "n": true
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "a-infinity",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": "Infinity",
        "n": 2
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "a-abc",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": "abc",
        "n": 2
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "Enter a finite number."
    },
    {
      "id": "boundary-root-even-neg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": -8,
        "n": 2
      },
      "expectError": "NOT_REAL",
      "code": "NOT_REAL",
      "error": "Even roots of negative numbers are not real."
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 24,
      "total": 24,
      "golden": 10,
      "boundary": 14,
      "property": 0
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-10T22:48:17.762Z",
  "rendered_at": "2026-09-16T22:03:43.777Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.5",
    "artifacts": {
      "engine": "1.0.5",
      "page": "1.0.5",
      "capability": "1.0.5",
      "evidence": "1.0.5",
      "input_schema": "1.0.5",
      "output_schema": "1.0.5",
      "mcp_contract": "1.0.5"
    },
    "digests": {
      "input_schema_sha256": "d0ef74fe6f7704d12f423072babe01e3271217e5bcd4efcca488f5a5cce6a060",
      "output_schema_sha256": "926b0e5761c82a91c0fea6146365eeacd6097d2ded3d7162df787ec7cd73c31a",
      "evidence_sha256": "84b87545e21e44d8aa0d2d526f58e9347cdf0cf7669ed27e032f6fe6cb81cdae",
      "evidence_core_sha256": "84b87545e21e44d8aa0d2d526f58e9347cdf0cf7669ed27e032f6fe6cb81cdae",
      "capability_sha256": "4de9cbbf113f5a31050e6ea423f001e0ca678c8bf39bd64776e9512a1cb30202",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 3,
      "passed": 3,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.5"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
