{
  "capability_id": "math.modulo",
  "tool_id": "modulo",
  "engine": "modulo",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-16T14:39:28.358Z",
  "engine_build": "2026-09-16",
  "test_count": 9,
  "passed": 9,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 2,
      "passed": 2
    },
    "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/modulo",
  "api": "https://www.calculatorx.com/api/v1/calc/modulo",
  "schema_input": "https://www.calculatorx.com/schemas/math.modulo.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.modulo.output.json",
  "assumptions": [
    "Euclidean remainder",
    "Not JavaScript truncated %",
    "Integers only"
  ],
  "limitations": [
    "Euclidean remainder, not truncated or floored remainder toward −∞ of the quotient only",
    "Not IEEE remainder or floating-point fmod",
    "modulus = 0 → DIVISION_BY_ZERO",
    "Share URLs use modulus, not m (m is reserved elsewhere)"
  ],
  "boundary_conditions": [
    "missing a or modulus → MISSING_REQUIRED_INPUT",
    "modulus = 0 → DIVISION_BY_ZERO"
  ],
  "sources": [
    "ISO 80000-2:2019 Quantities and units — Mathematics (integer division / remainder)",
    "Knuth, The Art of Computer Programming, Euclidean division (remainder ≥ 0)"
  ],
  "methods": [],
  "fingerprint": "sha256:5ba3a81dd04037965fc6b23d197c431682f90dc6c960dd3d5db6d516b6d5828f",
  "tests": [
    {
      "id": "golden-mod",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": 17,
        "modulus": 5
      },
      "expect": {
        "remainder": 2,
        "quotient": 3
      },
      "expectWarning": null,
      "actual": {
        "a": 17,
        "modulus": 5,
        "remainder": 2,
        "quotient": 3,
        "identity": "17 = (3)·(5) + 2",
        "convention": "euclidean"
      },
      "tol": null
    },
    {
      "id": "golden-mod-negative",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "a": -17,
        "modulus": 5
      },
      "expect": {
        "remainder": 3,
        "quotient": -4
      },
      "expectWarning": null,
      "actual": {
        "a": -17,
        "modulus": 5,
        "remainder": 3,
        "quotient": -4,
        "identity": "-17 = (-4)·(5) + 3",
        "convention": "euclidean"
      },
      "tol": null
    },
    {
      "id": "boundary-mod-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 10,
        "modulus": 0
      },
      "expectError": "DIVISION_BY_ZERO",
      "code": "DIVISION_BY_ZERO",
      "error": "modulus must be non-zero."
    },
    {
      "id": "boundary-mod-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "a": 10
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "Enter an integer modulus."
    },
    {
      "id": "property-mod-pos",
      "ok": true,
      "kind": "property",
      "detail": "17 = 3·5 + 2",
      "expect": 2,
      "actual": 2
    },
    {
      "id": "property-mod-neg",
      "ok": true,
      "kind": "property",
      "detail": "−17 = (−4)·5 + 3",
      "expect": 3,
      "actual": 3
    },
    {
      "id": "property-mod-range",
      "ok": true,
      "kind": "property",
      "detail": "0 ≤ r < |m|",
      "expect": true,
      "actual": 3
    },
    {
      "id": "property-mod-identity",
      "ok": true,
      "kind": "property",
      "detail": "a = q·m + r",
      "expect": -17,
      "actual": -17
    },
    {
      "id": "property-mod-neg-m",
      "ok": true,
      "kind": "property",
      "detail": "r still in [0,|m|)",
      "expect": 2,
      "actual": 2
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 9,
      "total": 9,
      "golden": 2,
      "boundary": 2,
      "property": 5
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-16T14:30:31.968Z",
  "rendered_at": "2026-09-16T14:39:28.358Z",
  "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": "19372bdf1fd728b662c50bf812d7e8aa118d70ce261d2d2631e0ae8e010ac866",
      "output_schema_sha256": "1b4650313a5147e01abd108983a2ef1a1df66e3f5eee1a782caf14785a16d623",
      "evidence_sha256": "05938d4652d3f99c2f4dcbb2e2c79b481653bdf34fd28bcf7deeeba3bbb75acc",
      "evidence_core_sha256": "05938d4652d3f99c2f4dcbb2e2c79b481653bdf34fd28bcf7deeeba3bbb75acc",
      "capability_sha256": "d11f743f6ed42af6047fd7374050899c288c76e0b2a30a2a34b54364ef006cae",
      "engine_sha256": "e334f2538fa740d4d06695357567d1c4dc3aba80b21a914697847445f7e5bad8",
      "mcp_contract_sha256": "d43d6b749952694caf9257df4c7c5eb805cccdce3e3021e92420f04757702e4c"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "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"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
