{
  "capability_id": "math.complex",
  "tool_id": "complex",
  "engine": "complex",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-16T22:38:08.875Z",
  "engine_build": "2026-09-16",
  "test_count": 10,
  "passed": 10,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 3,
      "passed": 3
    },
    "boundary": {
      "total": 2,
      "passed": 2
    },
    "property": {
      "total": 5,
      "passed": 5
    }
  },
  "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/complex-number",
  "api": "https://www.calculatorx.com/api/v1/calc/complex",
  "schema_input": "https://www.calculatorx.com/schemas/math.complex.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.complex.output.json",
  "assumptions": [
    "atan2 argument in degrees",
    "Not a CAS"
  ],
  "limitations": [
    "Not symbolic simplify or complex analysis",
    "Division by 0+0i → DIVISION_BY_ZERO",
    "Argument uses atan2, degrees"
  ],
  "boundary_conditions": [
    "divide by 0+0i → DIVISION_BY_ZERO",
    "unknown mode (including simplify) → INVALID_MODE"
  ],
  "sources": [
    "ISO 80000-2:2019 Quantities and units — Mathematics"
  ],
  "methods": [],
  "fingerprint": "sha256:10d0726adfb5d6b2d6b6c15e45e2340055dd87c95b82e7625044f1cf0a6d8576",
  "tests": [
    {
      "id": "golden-add",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "add",
        "re": 1,
        "im": 2,
        "re2": 3,
        "im2": 4
      },
      "expect": {
        "re": 4,
        "im": 6
      },
      "expectWarning": null,
      "actual": {
        "mode": "add",
        "re": 4,
        "im": 6,
        "r": 7.21110255093,
        "arg_deg": 56.309932474,
        "formula": "(re₁+re₂) + (im₁+im₂)i"
      },
      "tol": null
    },
    {
      "id": "golden-polar",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "rect_to_polar",
        "re": 3,
        "im": 4
      },
      "expect": {
        "r": 5
      },
      "expectWarning": null,
      "actual": {
        "mode": "rect_to_polar",
        "re": 3,
        "im": 4,
        "r": 5,
        "arg_deg": 53.1301023542,
        "formula": "r = |z|, θ = atan2(im, re)"
      },
      "tol": 1e-12
    },
    {
      "id": "golden-mul-i",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "mul",
        "re": 0,
        "im": 1,
        "re2": 0,
        "im2": 1
      },
      "expect": {
        "re": -1,
        "im": 0
      },
      "expectWarning": null,
      "actual": {
        "mode": "mul",
        "re": -1,
        "im": 0,
        "r": 1,
        "arg_deg": 180,
        "formula": "(re₁re₂ − im₁im₂) + (re₁im₂ + im₁re₂)i"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-complex-div0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "div",
        "re": 1,
        "im": 0,
        "re2": 0,
        "im2": 0
      },
      "expectError": "DIVISION_BY_ZERO",
      "code": "DIVISION_BY_ZERO",
      "error": "Cannot divide by 0+0i."
    },
    {
      "id": "boundary-complex-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "simplify",
        "re": 1,
        "im": 0
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be add, sub, mul, div, rect_to_polar, polar_to_rect, conjugate, or modulus."
    },
    {
      "id": "property-cx-add",
      "ok": true,
      "kind": "property",
      "detail": "sum",
      "expect": "4+6i",
      "actual": "4+6i"
    },
    {
      "id": "property-cx-i2",
      "ok": true,
      "kind": "property",
      "detail": "i²=-1",
      "expect": -1,
      "actual": -1
    },
    {
      "id": "property-cx-mod",
      "ok": true,
      "kind": "property",
      "detail": "|3+4i|=5",
      "expect": 5,
      "actual": 5
    },
    {
      "id": "property-cx-roundtrip",
      "ok": true,
      "kind": "property",
      "detail": "polar round-trip",
      "expect": 3,
      "actual": 3
    },
    {
      "id": "property-cx-conj",
      "ok": true,
      "kind": "property",
      "detail": "conjugate",
      "expect": -5,
      "actual": -5
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 10,
      "total": 10,
      "golden": 3,
      "boundary": 2,
      "property": 5
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-16T14:46:01.365Z",
  "rendered_at": "2026-09-16T22:38:08.875Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.0",
    "artifacts": {
      "engine": "1.0.0",
      "page": "1.0.0",
      "capability": "1.0.0",
      "evidence": "1.0.0",
      "input_schema": "1.0.0",
      "output_schema": "1.0.0",
      "mcp_contract": "1.0.0"
    },
    "digests": {
      "input_schema_sha256": "4cf84dd483ee83894950202488a25034d1e795f3bcf1b55d8431884f8f9933ce",
      "output_schema_sha256": "2dce8acca717361bf9b17712c9ffd220d5d3bdf442afea1bf01b77242cc69442",
      "evidence_sha256": "6d9957638ee2391d5820ccf6b8270367d720dedadb71ed89994b553ab17065a8",
      "evidence_core_sha256": "6d9957638ee2391d5820ccf6b8270367d720dedadb71ed89994b553ab17065a8",
      "capability_sha256": "e2b27aa1932b0540cc7261c45c220effe683b51a55e8f419fb946f8bcd4943a1",
      "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.0"
        },
        {
          "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"
  }
}
