{"abstract":"Cube root canonicalizes negative zero.","category":"Floating-point arithmetic","checks":8,"contract":"Real cube root on finite binary64 inputs. Split magnitude with frexp, divide exponent by three with floor division, and apply residual exponent before rooting. Return signed zero unchanged. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","evaluation_group":"s3-float-cbrt-scaled","failed_approach":"The attempted local correction if x==0: return \"-0\" still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-cbrt-scaled-cube-zero-sign","id":"FA-17206","implementations":{"attempt":{"sha256":"56fcbd7fb3d507faf14b1a276bfefa077fd86fb6652417b5abd8940ae8bba584","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\ndef render(x):\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return '-infinity' if x<0 else '+infinity'\n    return format(x,'.11g')\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        if x==0: return \"-0\"\n        m,e=math.frexp(abs(x))\n        q,r=divmod(e,3)\n        root=(math.ldexp(m,r))**(1/3)\n        result=math.ldexp(root,q)\n        return render(math.copysign(result,x))\n    except (ValueError, OverflowError, ZeroDivisionError, TypeError):\n        return \"arithmetic-error\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('integer cube', solve(float(N**3)), render(float(N)))\ncheck('negative cube', solve(-float(N**3)), render(-float(N)))\ncheck('huge', solve(1e300), \"1e+100\")\ncheck('tiny', solve(1e-300), \"1e-100\")\ncheck('power remainder', solve(16.0), render(16.0**(1/3)))\ncheck('negative zero', solve(-0.0), \"-0\")\ncheck('positive zero', solve(0.0), \"0\")\ncheck('subnormal', solve(math.ldexp(1.0,-1074)), render(math.ldexp(1.0,-358)))\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":"178020bc73bccda9ed77ae2fcd3495649dc4f6bbe6d70156d020dd85bc112753","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\ndef render(x):\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return '-infinity' if x<0 else '+infinity'\n    return format(x,'.11g')\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        if x==0: return \"0\"\n        m,e=math.frexp(abs(x))\n        q,r=divmod(e,3)\n        root=(math.ldexp(m,r))**(1/3)\n        result=math.ldexp(root,q)\n        return render(math.copysign(result,x))\n    except (ValueError, OverflowError, ZeroDivisionError, TypeError):\n        return \"arithmetic-error\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('integer cube', solve(float(N**3)), render(float(N)))\ncheck('negative cube', solve(-float(N**3)), render(-float(N)))\ncheck('huge', solve(1e300), \"1e+100\")\ncheck('tiny', solve(1e-300), \"1e-100\")\ncheck('power remainder', solve(16.0), render(16.0**(1/3)))\ncheck('negative zero', solve(-0.0), \"-0\")\ncheck('positive zero', solve(0.0), \"0\")\ncheck('subnormal', solve(math.ldexp(1.0,-1074)), render(math.ldexp(1.0,-358)))\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":"8d1682424e4547465621b0843c39f37c1b286e588de48c5a99019c32d45b41d1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\ndef render(x):\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return '-infinity' if x<0 else '+infinity'\n    return format(x,'.11g')\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        if x==0: return render(x)\n        m,e=math.frexp(abs(x))\n        q,r=divmod(e,3)\n        root=(math.ldexp(m,r))**(1/3)\n        result=math.ldexp(root,q)\n        return render(math.copysign(result,x))\n    except (ValueError, OverflowError, ZeroDivisionError, TypeError):\n        return \"arithmetic-error\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('integer cube', solve(float(N**3)), render(float(N)))\ncheck('negative cube', solve(-float(N**3)), render(-float(N)))\ncheck('huge', solve(1e300), \"1e+100\")\ncheck('tiny', solve(1e-300), \"1e-100\")\ncheck('power remainder', solve(16.0), render(16.0**(1/3)))\ncheck('negative zero', solve(-0.0), \"-0\")\ncheck('positive zero', solve(0.0), \"0\")\ncheck('subnormal', solve(math.ldexp(1.0,-1074)), render(math.ldexp(1.0,-358)))\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":"Controlled binary64 or explicitly stipulated miniature format; no hardware exception flags or platform floating environment are modeled. 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":"s3-floating_point_arithmetic-cbrt-scaled-cube-zero-sign","generated_at":"2026-09-29T14:39:44.050842+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline floating representation model isolates a reproducible arithmetic fault.","repair":"Apply the contract at this fault site using if x==0: return render(x).","root_cause":"Cube root canonicalizes negative zero. The faulty expression is if x==0: return \"0\".","sha256":"a1badc8df3654aa853311caba209dfe86d243486691e85c0368dc32f7fa17a0c","title":"Cube root canonicalizes negative zero · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.284,"exit_code":1,"observations":[{"actual":"1","check":"integer cube","expected":"1","passed":true},{"actual":"-1","check":"negative cube","expected":"-1","passed":true},{"actual":"1e+100","check":"huge","expected":"1e+100","passed":true},{"actual":"1e-100","check":"tiny","expected":"1e-100","passed":true},{"actual":"2.5198420998","check":"power remainder","expected":"2.5198420998","passed":true},{"actual":"-0","check":"negative zero","expected":"-0","passed":true},{"actual":"-0","check":"positive zero","expected":"0","passed":false},{"actual":"1.703183936e-108","check":"subnormal","expected":"1.703183936e-108","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"integer cube\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"negative cube\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"huge\", \"actual\": \"1e+100\", \"expected\": \"1e+100\", \"passed\": true}, {\"check\": \"tiny\", \"actual\": \"1e-100\", \"expected\": \"1e-100\", \"passed\": true}, {\"check\": \"power remainder\", \"actual\": \"2.5198420998\", \"expected\": \"2.5198420998\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"positive zero\", \"actual\": \"-0\", \"expected\": \"0\", \"passed\": false}, {\"check\": \"subnormal\", \"actual\": \"1.703183936e-108\", \"expected\": \"1.703183936e-108\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.468,"exit_code":1,"observations":[{"actual":"1","check":"integer cube","expected":"1","passed":true},{"actual":"-1","check":"negative cube","expected":"-1","passed":true},{"actual":"1e+100","check":"huge","expected":"1e+100","passed":true},{"actual":"1e-100","check":"tiny","expected":"1e-100","passed":true},{"actual":"2.5198420998","check":"power remainder","expected":"2.5198420998","passed":true},{"actual":"0","check":"negative zero","expected":"-0","passed":false},{"actual":"0","check":"positive zero","expected":"0","passed":true},{"actual":"1.703183936e-108","check":"subnormal","expected":"1.703183936e-108","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"integer cube\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"negative cube\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"huge\", \"actual\": \"1e+100\", \"expected\": \"1e+100\", \"passed\": true}, {\"check\": \"tiny\", \"actual\": \"1e-100\", \"expected\": \"1e-100\", \"passed\": true}, {\"check\": \"power remainder\", \"actual\": \"2.5198420998\", \"expected\": \"2.5198420998\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"0\", \"expected\": \"-0\", \"passed\": false}, {\"check\": \"positive zero\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"subnormal\", \"actual\": \"1.703183936e-108\", \"expected\": \"1.703183936e-108\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.67,"exit_code":0,"observations":[{"actual":"1","check":"integer cube","expected":"1","passed":true},{"actual":"-1","check":"negative cube","expected":"-1","passed":true},{"actual":"1e+100","check":"huge","expected":"1e+100","passed":true},{"actual":"1e-100","check":"tiny","expected":"1e-100","passed":true},{"actual":"2.5198420998","check":"power remainder","expected":"2.5198420998","passed":true},{"actual":"-0","check":"negative zero","expected":"-0","passed":true},{"actual":"0","check":"positive zero","expected":"0","passed":true},{"actual":"1.703183936e-108","check":"subnormal","expected":"1.703183936e-108","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"integer cube\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"negative cube\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"huge\", \"actual\": \"1e+100\", \"expected\": \"1e+100\", \"passed\": true}, {\"check\": \"tiny\", \"actual\": \"1e-100\", \"expected\": \"1e-100\", \"passed\": true}, {\"check\": \"power remainder\", \"actual\": \"2.5198420998\", \"expected\": \"2.5198420998\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"positive zero\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"subnormal\", \"actual\": \"1.703183936e-108\", \"expected\": \"1.703183936e-108\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}