{"abstract":"Truncating division leaves a negative remainder.","category":"Integer arithmetic","checks":4,"contract":"Integer arguments; denominators, steps, moduli, and bit widths are positive. Unsigned word inputs fit the specified width except where masking is explicitly the operation. Sequence sizes are nonnegative. Return r in [0,b) such that a-r is divisible by b. Exact operational definition: a % b","evaluation_group":"model-64efa9aa19c26621","failed_approach":"Taking the input magnitude changes the residue class.","family":"xn-euclidean-remainder-positive-modulus","id":"FA-5336","implementations":{"attempt":{"sha256":"d617a5d426c66cb9bbee329c69d60c8fa95e388b04ed6c7b15d14ce6fc4900a1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(a, b):\n    return abs(a) % b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (-7, 3)', solve(*(-7, 3)), 2)\ncheck('fixture 2: (7, 3)', solve(*(7, 3)), 1)\ncheck('fixture 3: (-6, 3)', solve(*(-6, 3)), 0)\ncheck('fixture 4: (0, 4)', solve(*(0, 4)), 0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"40347854217f4f06f7efd01ef213d6761cfe8eaf40f880d9569a6ae0faad4ffd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(a, b):\n    return a - int(a / b) * b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (-7, 3)', solve(*(-7, 3)), 2)\ncheck('fixture 2: (7, 3)', solve(*(7, 3)), 1)\ncheck('fixture 3: (-6, 3)', solve(*(-6, 3)), 0)\ncheck('fixture 4: (0, 4)', solve(*(0, 4)), 0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"9352434f052b9250cf9768cc3ff55624ebc6a16b1e1469800783cc5096b6c12b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(a, b):\n    return a % b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (-7, 3)', solve(*(-7, 3)), 2)\ncheck('fixture 2: (7, 3)', solve(*(7, 3)), 1)\ncheck('fixture 3: (-6, 3)', solve(*(-6, 3)), 0)\ncheck('fixture 4: (0, 4)', solve(*(0, 4)), 0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xn-euclidean-remainder-positive-modulus","generated_at":"2026-09-29T14:37:48.420877+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Integer mathematics results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return a % b","root_cause":"Truncating division leaves a negative remainder.","sha256":"81114c2b6e5510660b3ff7dae2ecc327bf55c3b1cd39da7a74f9694e251b99e7","title":"Euclidean remainder positive modulus · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.172,"exit_code":1,"observations":[{"actual":1,"check":"fixture 1: (-7, 3)","expected":2,"passed":false},{"actual":1,"check":"fixture 2: (7, 3)","expected":1,"passed":true},{"actual":0,"check":"fixture 3: (-6, 3)","expected":0,"passed":true},{"actual":0,"check":"fixture 4: (0, 4)","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (-7, 3)\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"fixture 2: (7, 3)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 3: (-6, 3)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 4: (0, 4)\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":47.518,"exit_code":1,"observations":[{"actual":-1,"check":"fixture 1: (-7, 3)","expected":2,"passed":false},{"actual":1,"check":"fixture 2: (7, 3)","expected":1,"passed":true},{"actual":0,"check":"fixture 3: (-6, 3)","expected":0,"passed":true},{"actual":0,"check":"fixture 4: (0, 4)","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (-7, 3)\", \"actual\": -1, \"expected\": 2, \"passed\": false}, {\"check\": \"fixture 2: (7, 3)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 3: (-6, 3)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 4: (0, 4)\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":112.052,"exit_code":0,"observations":[{"actual":2,"check":"fixture 1: (-7, 3)","expected":2,"passed":true},{"actual":1,"check":"fixture 2: (7, 3)","expected":1,"passed":true},{"actual":0,"check":"fixture 3: (-6, 3)","expected":0,"passed":true},{"actual":0,"check":"fixture 4: (0, 4)","expected":0,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (-7, 3)\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"fixture 2: (7, 3)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 3: (-6, 3)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 4: (0, 4)\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}