{"abstract":"Fixed-point rescale truncates instead of rounding.","category":"Model quantization arithmetic","checks":7,"contract":"Compute round-to-even of x*multiplier/2**shift for nonnegative shift; return integer outputs. Inputs follow this explicit integer toy contract; ties use Python round-to-even where rounding is required.","contract_signature":"values, multiplier, shift","evaluation_group":"quant-fixed_point","failed_approach":"The attempted code restores multiplication and shifting but truncates discarded fractional bits instead of rounding them.","family":"w3-model-quantization-arithmetic-right-shift-round","id":"FA-98681","implementations":{"attempt":{"sha256":"f4792cdc0856e8b3fce2167a9c16aee981dcfb6735296aadc77e08ab7e808b53","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(values, multiplier, shift):\n    return [(x*multiplier)>>shift for x in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('exact',solve([4*N],3,2),[3*N])\ncheck('positive fraction',solve([2],1,1),[1])\ncheck('negative fraction',solve([-2],1,1),[-1])\ncheck('empty',solve([],3,2),[])\ncheck('half even',solve([1],1,1),[0])\ncheck('quarter',solve([1],1,2),[0])\ncheck('odd half tie',solve([3],1,1),[2])\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":"ac2e5f56d53f91d3aaa71af3e1e318e92b617d1aaa379d13bf89fbdd0716f00c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(values, multiplier, shift):\n    return [((x*multiplier)+(1<<shift)-1)>>shift for x in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('exact',solve([4*N],3,2),[3*N])\ncheck('positive fraction',solve([2],1,1),[1])\ncheck('negative fraction',solve([-2],1,1),[-1])\ncheck('empty',solve([],3,2),[])\ncheck('half even',solve([1],1,1),[0])\ncheck('quarter',solve([1],1,2),[0])\ncheck('odd half tie',solve([3],1,1),[2])\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":"Toy scalar/list arithmetic only; it does not model a production quantizer, hardware instruction, or accuracy/performance gain. 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":"w3-model-quantization-arithmetic-right-shift-round","generated_at":"2026-09-30T16:48:15.841967+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic model isolates one quantization arithmetic contract from tensor storage and runtime kernels.","root_cause":"Compute round-to-even of x*multiplier/2**shift for nonnegative shift; return integer outputs.","sha256":"f09582c862bd973cda952047009864ef95cf40f2f9de9606ef06eea80b6dd20d","title":"Quantization: Fixed-point rescale truncates instead of rounding · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":29.731,"exit_code":1,"observations":[{"actual":[3],"check":"exact","expected":[3],"passed":true},{"actual":[1],"check":"positive fraction","expected":[1],"passed":true},{"actual":[-1],"check":"negative fraction","expected":[-1],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0],"check":"half even","expected":[0],"passed":true},{"actual":[0],"check":"quarter","expected":[0],"passed":true},{"actual":[1],"check":"odd half tie","expected":[2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"positive fraction\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"negative fraction\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"half even\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"quarter\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"odd half tie\", \"actual\": [1], \"expected\": [2], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.325,"exit_code":1,"observations":[{"actual":[3],"check":"exact","expected":[3],"passed":true},{"actual":[1],"check":"positive fraction","expected":[1],"passed":true},{"actual":[-1],"check":"negative fraction","expected":[-1],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[1],"check":"half even","expected":[0],"passed":false},{"actual":[1],"check":"quarter","expected":[0],"passed":false},{"actual":[2],"check":"odd half tie","expected":[2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"positive fraction\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"negative fraction\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"half even\", \"actual\": [1], \"expected\": [0], \"passed\": false}, {\"check\": \"quarter\", \"actual\": [1], \"expected\": [0], \"passed\": false}, {\"check\": \"odd half tie\", \"actual\": [2], \"expected\": [2], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}