{"abstract":"Scaled square root drops the odd exponent remainder.","category":"Floating-point arithmetic","checks":9,"contract":"Nonnegative square root of finite binary64 x via exponent normalization. Negative input returns domain; negative zero is preserved. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","contract_signature":"x","evaluation_group":"s3-float-sqrt-scaled","failed_approach":"The attempted local correction root=math.sqrt(m)*r still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-sqrt-scaled-odd-exponent","id":"FA-17211","implementations":{"attempt":{"sha256":"f9b25ce96563ac98336daeeead7dff0b574d51cfc638d9ba0d24b2fec9c6db2a","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 'domain'\n        if x==0: return render(x)\n        m,e=math.frexp(x)\n        q,r=divmod(e,2)\n        root=math.sqrt(m)*r\n        return render(math.ldexp(root,q))\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('square', solve(float(N*N)), render(float(N)))\ncheck('normal', solve(float(N)), render(math.sqrt(N)))\ncheck('huge', solve(1e300), \"1e+150\")\ncheck('tiny', solve(1e-300), \"1e-150\")\ncheck('odd exponent', solve(2.0), render(math.sqrt(2)))\ncheck('positive root zero', solve(0.0), \"0\")\ncheck('negative domain', solve(-float(N)), \"domain\")\ncheck('negative zero', solve(-0.0), \"-0\")\ncheck('subnormal', solve(math.ldexp(1.0,-1074)), render(math.ldexp(1.0,-537)))\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":"009feeae73661c5ecdfc5b93328b7c83544166a18201ef0280bb4818d052d840","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 'domain'\n        if x==0: return render(x)\n        m,e=math.frexp(x)\n        q,r=divmod(e,2)\n        root=math.sqrt(m)\n        return render(math.ldexp(root,q))\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('square', solve(float(N*N)), render(float(N)))\ncheck('normal', solve(float(N)), render(math.sqrt(N)))\ncheck('huge', solve(1e300), \"1e+150\")\ncheck('tiny', solve(1e-300), \"1e-150\")\ncheck('odd exponent', solve(2.0), render(math.sqrt(2)))\ncheck('positive root zero', solve(0.0), \"0\")\ncheck('negative domain', solve(-float(N)), \"domain\")\ncheck('negative zero', solve(-0.0), \"-0\")\ncheck('subnormal', solve(math.ldexp(1.0,-1074)), render(math.ldexp(1.0,-537)))\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-sqrt-scaled-odd-exponent","generated_at":"2026-09-29T14:39:44.363901+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.","root_cause":"Scaled square root drops the odd exponent remainder. The faulty expression is root=math.sqrt(m).","sha256":"21d0fa0bdfe71bb224474baffb9f28a2b97459fbaa4436a0c8775724d010f394","title":"Scaled square root drops the odd exponent remainder · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.696,"exit_code":1,"observations":[{"actual":"0.70710678119","check":"square","expected":"1","passed":false},{"actual":"0.70710678119","check":"normal","expected":"1","passed":false},{"actual":"7.0710678119e+149","check":"huge","expected":"1e+150","passed":false},{"actual":"0","check":"tiny","expected":"1e-150","passed":false},{"actual":"0","check":"odd exponent","expected":"1.4142135624","passed":false},{"actual":"0","check":"positive root zero","expected":"0","passed":true},{"actual":"domain","check":"negative domain","expected":"domain","passed":true},{"actual":"-0","check":"negative zero","expected":"-0","passed":true},{"actual":"1.5717277847e-162","check":"subnormal","expected":"2.2227587495e-162","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"square\", \"actual\": \"0.70710678119\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"normal\", \"actual\": \"0.70710678119\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"huge\", \"actual\": \"7.0710678119e+149\", \"expected\": \"1e+150\", \"passed\": false}, {\"check\": \"tiny\", \"actual\": \"0\", \"expected\": \"1e-150\", \"passed\": false}, {\"check\": \"odd exponent\", \"actual\": \"0\", \"expected\": \"1.4142135624\", \"passed\": false}, {\"check\": \"positive root zero\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"negative domain\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"subnormal\", \"actual\": \"1.5717277847e-162\", \"expected\": \"2.2227587495e-162\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.723,"exit_code":1,"observations":[{"actual":"0.70710678119","check":"square","expected":"1","passed":false},{"actual":"0.70710678119","check":"normal","expected":"1","passed":false},{"actual":"7.0710678119e+149","check":"huge","expected":"1e+150","passed":false},{"actual":"1e-150","check":"tiny","expected":"1e-150","passed":true},{"actual":"1.4142135624","check":"odd exponent","expected":"1.4142135624","passed":true},{"actual":"0","check":"positive root zero","expected":"0","passed":true},{"actual":"domain","check":"negative domain","expected":"domain","passed":true},{"actual":"-0","check":"negative zero","expected":"-0","passed":true},{"actual":"1.5717277847e-162","check":"subnormal","expected":"2.2227587495e-162","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"square\", \"actual\": \"0.70710678119\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"normal\", \"actual\": \"0.70710678119\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"huge\", \"actual\": \"7.0710678119e+149\", \"expected\": \"1e+150\", \"passed\": false}, {\"check\": \"tiny\", \"actual\": \"1e-150\", \"expected\": \"1e-150\", \"passed\": true}, {\"check\": \"odd exponent\", \"actual\": \"1.4142135624\", \"expected\": \"1.4142135624\", \"passed\": true}, {\"check\": \"positive root zero\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"negative domain\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"subnormal\", \"actual\": \"1.5717277847e-162\", \"expected\": \"2.2227587495e-162\", \"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."}}