{"abstract":"Multiplier rescale rounds before multiplying.","category":"Model quantization arithmetic","checks":6,"contract":"Multiply by the integer multiplier before dividing by 2**shift, then round-to-even once. 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 multiplies before shifting but uses floor division, which rounds fractional negative and positive results down.","family":"w3-model-quantization-arithmetic-multiplier-rounding","id":"FA-98691","implementations":{"attempt":{"sha256":"701eba9d42cb72453ee9621acce4bf3082d1de56899906cad028c601fdfa11b4","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) for x in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fraction after multiply',solve([3],3,2),[2])\ncheck('exact',solve([4*N],3,2),[3*N])\ncheck('negative',solve([-3],3,2),[-2])\ncheck('empty',solve([],3,2),[])\ncheck('ties even',solve([2],1,2),[0])\ncheck('large multiplier',solve([1],5,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":"5aed21f913dbe4777d79e9c568e6c927f3c58d0b4da1505b00d6f30f22b61b16","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(values, multiplier, shift):\n    return [round(x/(1<<shift))*multiplier for x in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fraction after multiply',solve([3],3,2),[2])\ncheck('exact',solve([4*N],3,2),[3*N])\ncheck('negative',solve([-3],3,2),[-2])\ncheck('empty',solve([],3,2),[])\ncheck('ties even',solve([2],1,2),[0])\ncheck('large multiplier',solve([1],5,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-multiplier-rounding","generated_at":"2026-09-30T16:48:15.841812+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":"Multiply by the integer multiplier before dividing by 2**shift, then round-to-even once.","sha256":"0292a68e08c911c6c559d195b3c6307bc5b379cbfce37dec132353997bef221a","title":"Quantization: Multiplier rescale rounds before multiplying · 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":30.529,"exit_code":1,"observations":[{"actual":[2],"check":"fraction after multiply","expected":[2],"passed":true},{"actual":[3],"check":"exact","expected":[3],"passed":true},{"actual":[-3],"check":"negative","expected":[-2],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0],"check":"ties even","expected":[0],"passed":true},{"actual":[2],"check":"large multiplier","expected":[2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fraction after multiply\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"exact\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"negative\", \"actual\": [-3], \"expected\": [-2], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"ties even\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"large multiplier\", \"actual\": [2], \"expected\": [2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.3,"exit_code":1,"observations":[{"actual":[3],"check":"fraction after multiply","expected":[2],"passed":false},{"actual":[3],"check":"exact","expected":[3],"passed":true},{"actual":[-3],"check":"negative","expected":[-2],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0],"check":"ties even","expected":[0],"passed":true},{"actual":[0],"check":"large multiplier","expected":[2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fraction after multiply\", \"actual\": [3], \"expected\": [2], \"passed\": false}, {\"check\": \"exact\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"negative\", \"actual\": [-3], \"expected\": [-2], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"ties even\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"large multiplier\", \"actual\": [0], \"expected\": [2], \"passed\": false}], \"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."}}