{"abstract":"Left rescale shifts in the wrong direction.","category":"Model quantization arithmetic","checks":6,"contract":"Apply an integer left shift after multiplying: result = x*multiplier*2**shift. 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 now expands by the power of two but adds the multiplier instead of multiplying by it.","family":"w3-model-quantization-arithmetic-left-shift-direction","id":"FA-98686","implementations":{"attempt":{"sha256":"c1450a9abba9de33a5ed99aeb8ff6797e5c88de832ae0ece0b91aaa985f6f4a5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(values, multiplier, shift):\n    return [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('left scale',solve([N],3,2),[12*N])\ncheck('zero input',solve([0],7,3),[0])\ncheck('empty',solve([],2,1),[])\ncheck('negative input',solve([-N],2,2),[-8*N])\ncheck('unit shift',solve([3],2,0),[6])\ncheck('multiple values',solve([1,2],1,3),[8,16])\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":"d232b09bc62e1b62cb62c97e599105ec6a9cbe95a14b7c7b34e7594f8e85b60e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(values, multiplier, shift):\n    return [round(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('left scale',solve([N],3,2),[12*N])\ncheck('zero input',solve([0],7,3),[0])\ncheck('empty',solve([],2,1),[])\ncheck('negative input',solve([-N],2,2),[-8*N])\ncheck('unit shift',solve([3],2,0),[6])\ncheck('multiple values',solve([1,2],1,3),[8,16])\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-left-shift-direction","generated_at":"2026-09-30T16:48:15.842274+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":"Apply an integer left shift after multiplying: result = x*multiplier*2**shift.","sha256":"8546dc5597479a0b5d7a0eb205a0d2a8cbdeb164fa94b2b6993814bf7931d876","title":"Quantization: Left rescale shifts in the wrong direction · 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.158,"exit_code":1,"observations":[{"actual":[7],"check":"left scale","expected":[12],"passed":false},{"actual":[7],"check":"zero input","expected":[0],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[-2],"check":"negative input","expected":[-8],"passed":false},{"actual":[5],"check":"unit shift","expected":[6],"passed":false},{"actual":[9,17],"check":"multiple values","expected":[8,16],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"left scale\", \"actual\": [7], \"expected\": [12], \"passed\": false}, {\"check\": \"zero input\", \"actual\": [7], \"expected\": [0], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"negative input\", \"actual\": [-2], \"expected\": [-8], \"passed\": false}, {\"check\": \"unit shift\", \"actual\": [5], \"expected\": [6], \"passed\": false}, {\"check\": \"multiple values\", \"actual\": [9, 17], \"expected\": [8, 16], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.874,"exit_code":1,"observations":[{"actual":[1],"check":"left scale","expected":[12],"passed":false},{"actual":[0],"check":"zero input","expected":[0],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[0],"check":"negative input","expected":[-8],"passed":false},{"actual":[6],"check":"unit shift","expected":[6],"passed":true},{"actual":[0,0],"check":"multiple values","expected":[8,16],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"left scale\", \"actual\": [1], \"expected\": [12], \"passed\": false}, {\"check\": \"zero input\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"negative input\", \"actual\": [0], \"expected\": [-8], \"passed\": false}, {\"check\": \"unit shift\", \"actual\": [6], \"expected\": [6], \"passed\": true}, {\"check\": \"multiple values\", \"actual\": [0, 0], \"expected\": [8, 16], \"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."}}