{
  "capability_id": "math.transform.dft",
  "tool_id": "discrete-fourier-transform",
  "engine": "discrete-fourier-transform",
  "calculation_version": "1.2.0",
  "generated_at": "2026-09-20T09:07:29.783Z",
  "engine_build": "2026-09-20",
  "test_count": 17,
  "passed": 17,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 6,
      "passed": 6
    },
    "boundary": {
      "total": 3,
      "passed": 3
    },
    "property": {
      "total": 8,
      "passed": 8
    }
  },
  "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/discrete-fourier-transform",
  "api": "https://www.calculatorx.com/api/v1/calc/discrete-fourier-transform",
  "schema_input": "https://www.calculatorx.com/schemas/math.transform.dft.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.transform.dft.output.json",
  "assumptions": [
    "Direct O(N²) DFT/IDFT; radix-2 FFT/IFFT",
    "Numpy backward normalization",
    "N ≤ 64; FFT N = 2^k",
    "Not Laplace / Z",
    "Not CAS"
  ],
  "limitations": [
    "Direct O(N²) DFT/IDFT, N≤64; radix-2 FFT/IFFT, N=2^k ≤64",
    "Numpy backward: unnormalized forward, 1/N inverse",
    "FFT agrees with DFT for power-of-2 N (Float64)",
    "Not Laplace / Z — other canonicals",
    "Not CAS",
    "unknown mode (including laplace, cas) → INVALID_MODE"
  ],
  "boundary_conditions": [
    "empty samples → INVALID_INPUT",
    "N > 64 → INVALID_INPUT",
    "im length mismatch → INVALID_INPUT",
    "N not a power of 2 on FFT → INVALID_INPUT",
    "unknown mode (including laplace, cas) → INVALID_MODE"
  ],
  "sources": [
    "ISO 80000-2:2019 Quantities and units — Mathematics"
  ],
  "methods": [],
  "fingerprint": "sha256:a8cbd603acbe8623de3e7ad27a3ff568d86892697430cc7ff689c74709856ed6",
  "tests": [
    {
      "id": "golden-dft-impulse",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "dft",
        "samples": [
          1,
          0,
          0,
          0
        ]
      },
      "expect": {
        "re": [
          1,
          1,
          1,
          1
        ],
        "n": 4,
        "algorithm": "direct",
        "normalization": "backward"
      },
      "expectWarning": null,
      "actual": {
        "mode": "dft",
        "n": 4,
        "algorithm": "direct",
        "normalization": "backward",
        "x_re": [
          1,
          0,
          0,
          0
        ],
        "x_im": [
          0,
          0,
          0,
          0
        ],
        "re": [
          1,
          1,
          1,
          1
        ],
        "im": [
          0,
          0,
          0,
          0
        ],
        "mag": [
          1,
          1,
          1,
          1
        ],
        "formula": "X[k] = Σ_n x[n] e^{−2πi kn/N}"
      },
      "tol": null
    },
    {
      "id": "golden-dft-dc",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "dft",
        "samples": [
          1,
          1,
          1,
          1
        ]
      },
      "expect": {
        "re": [
          4,
          0,
          0,
          0
        ],
        "n": 4
      },
      "expectWarning": null,
      "actual": {
        "mode": "dft",
        "n": 4,
        "algorithm": "direct",
        "normalization": "backward",
        "x_re": [
          1,
          1,
          1,
          1
        ],
        "x_im": [
          0,
          0,
          0,
          0
        ],
        "re": [
          4,
          0,
          0,
          0
        ],
        "im": [
          0,
          0,
          0,
          0
        ],
        "mag": [
          4,
          0,
          0,
          0
        ],
        "formula": "X[k] = Σ_n x[n] e^{−2πi kn/N}"
      },
      "tol": null
    },
    {
      "id": "golden-idft-dc",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "idft",
        "samples": [
          4,
          0,
          0,
          0
        ]
      },
      "expect": {
        "re": [
          1,
          1,
          1,
          1
        ],
        "n": 4
      },
      "expectWarning": null,
      "actual": {
        "mode": "idft",
        "n": 4,
        "algorithm": "direct",
        "normalization": "backward",
        "x_re": [
          4,
          0,
          0,
          0
        ],
        "x_im": [
          0,
          0,
          0,
          0
        ],
        "re": [
          1,
          1,
          1,
          1
        ],
        "im": [
          0,
          0,
          0,
          0
        ],
        "mag": [
          1,
          1,
          1,
          1
        ],
        "formula": "x[n] = (1/N) Σ_k X[k] e^{2πi kn/N}"
      },
      "tol": null
    },
    {
      "id": "boundary-dft-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "cas",
        "samples": [
          1,
          0,
          0,
          0
        ]
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be dft, idft, fft, or ifft. Not Laplace, not Z, not CAS."
    },
    {
      "id": "golden-fft-impulse",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "fft",
        "samples": [
          1,
          0,
          0,
          0
        ]
      },
      "expect": {
        "re": [
          1,
          1,
          1,
          1
        ],
        "n": 4,
        "algorithm": "radix2",
        "normalization": "backward"
      },
      "expectWarning": null,
      "actual": {
        "mode": "fft",
        "n": 4,
        "algorithm": "radix2",
        "normalization": "backward",
        "x_re": [
          1,
          0,
          0,
          0
        ],
        "x_im": [
          0,
          0,
          0,
          0
        ],
        "re": [
          1,
          1,
          1,
          1
        ],
        "im": [
          0,
          0,
          0,
          0
        ],
        "mag": [
          1,
          1,
          1,
          1
        ],
        "formula": "X[k] = Σ_n x[n] e^{−2πi kn/N}"
      },
      "tol": null
    },
    {
      "id": "golden-fft-dc",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "fft",
        "samples": [
          1,
          1,
          1,
          1
        ]
      },
      "expect": {
        "re": [
          4,
          0,
          0,
          0
        ],
        "n": 4,
        "algorithm": "radix2"
      },
      "expectWarning": null,
      "actual": {
        "mode": "fft",
        "n": 4,
        "algorithm": "radix2",
        "normalization": "backward",
        "x_re": [
          1,
          1,
          1,
          1
        ],
        "x_im": [
          0,
          0,
          0,
          0
        ],
        "re": [
          4,
          0,
          0,
          0
        ],
        "im": [
          0,
          0,
          0,
          0
        ],
        "mag": [
          4,
          0,
          0,
          0
        ],
        "formula": "X[k] = Σ_n x[n] e^{−2πi kn/N}"
      },
      "tol": null
    },
    {
      "id": "golden-ifft-dc",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "ifft",
        "samples": [
          4,
          0,
          0,
          0
        ]
      },
      "expect": {
        "re": [
          1,
          1,
          1,
          1
        ],
        "n": 4,
        "algorithm": "radix2"
      },
      "expectWarning": null,
      "actual": {
        "mode": "ifft",
        "n": 4,
        "algorithm": "radix2",
        "normalization": "backward",
        "x_re": [
          4,
          0,
          0,
          0
        ],
        "x_im": [
          0,
          0,
          0,
          0
        ],
        "re": [
          1,
          1,
          1,
          1
        ],
        "im": [
          0,
          0,
          0,
          0
        ],
        "mag": [
          1,
          1,
          1,
          1
        ],
        "formula": "x[n] = (1/N) Σ_k X[k] e^{2πi kn/N}"
      },
      "tol": null
    },
    {
      "id": "boundary-fft-n3",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "fft",
        "samples": [
          1,
          0,
          0
        ]
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "FFT N must be a power of 2 (N=2^k, 1–64)."
    },
    {
      "id": "boundary-dft-n65",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "dft",
        "samples": [
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ]
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "N must be 1–64 on this seed."
    },
    {
      "id": "property-dft-impulse",
      "ok": true,
      "kind": "property",
      "detail": "impulse → ones",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-dft-dc",
      "ok": true,
      "kind": "property",
      "detail": "DC → N at bin 0",
      "expect": 4,
      "actual": 4
    },
    {
      "id": "property-idft-dc",
      "ok": true,
      "kind": "property",
      "detail": "IDFT DC → ones",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-dft-roundtrip",
      "ok": true,
      "kind": "property",
      "detail": "IDFT(DFT(impulse))",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-fft-impulse",
      "ok": true,
      "kind": "property",
      "detail": "FFT impulse → ones",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-fft-dc",
      "ok": true,
      "kind": "property",
      "detail": "FFT DC → N at bin 0",
      "expect": 4,
      "actual": 4
    },
    {
      "id": "property-fft-matches-dft",
      "ok": true,
      "kind": "property",
      "detail": "FFT = DFT for N=8",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-fft-roundtrip",
      "ok": true,
      "kind": "property",
      "detail": "IFFT(FFT(impulse))",
      "expect": 1,
      "actual": 1
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 17,
      "total": 17,
      "golden": 6,
      "boundary": 3,
      "property": 8
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-20T07:48:45.138Z",
  "rendered_at": "2026-09-20T09:07:29.783Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.2.0",
    "artifacts": {
      "engine": "1.2.0",
      "page": "1.2.0",
      "capability": "1.2.0",
      "evidence": "1.2.0",
      "input_schema": "1.2.0",
      "output_schema": "1.2.0",
      "mcp_contract": "1.2.0"
    },
    "digests": {
      "input_schema_sha256": "f063080da5b0e18188f2ff460a1ad27239f3f9c5e16a0ce2ab68000d6af9d487",
      "output_schema_sha256": "032879b320a62a7f2d82d7119a81a838343abbbd576270aa73bb0d06c83fa050",
      "evidence_sha256": "032b245c3416960b30b8d8b1dd29218d45fcb0d977b83876898d0c8db0a8a409",
      "evidence_core_sha256": "032b245c3416960b30b8d8b1dd29218d45fcb0d977b83876898d0c8db0a8a409",
      "capability_sha256": "8af9350d2dc41004efbad5fe07fe19947e29deca7ce61e95eea34ab787c08e68",
      "engine_sha256": "43bbc25ec362b3f78daa612fef9a96df34206649b79e753faa7f17441d59b17a",
      "mcp_contract_sha256": "bf0dcfcfd80680efd201a229fab7f7a80ba9abbff3bea07815672d1d5cb2435a"
    },
    "contract_checks": {
      "total": 3,
      "passed": 3,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.2.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"
  }
}
