{"abstract":"Sine-pi loses the sign of an exact integer zero.","category":"Floating-point arithmetic","checks":11,"contract":"Evaluate sin(pi*x) for finite x using modulo-two reduction, with exact integer zeros carrying the sign of x and exact half-integer extrema. 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-sinpi","failed_approach":"The attempted local correction if r==0 or abs(r)==1: return render(math.copysign(0.0,r)) still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-sinpi-integer-zero-sign","id":"FA-16756","implementations":{"attempt":{"sha256":"2635a9e86f07f260b95211e4387a520750fac0481928e5b99a9ea10a3c0422c7","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        r=math.remainder(x,2.0)\n        if r==0 or abs(r)==1: return render(math.copysign(0.0,r))\n        if r==0.5: return '1'\n        if r==-0.5: return '-1'\n        if r>0.5: r=1-r\n        elif r < -0.5: r=-1-r\n        return render(math.sin(math.pi*r))\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('remainder sign reversal', solve(3.0), \"0\")\ncheck('positive integer', solve(float(N)), \"0\")\ncheck('negative integer', solve(-float(N)), \"-0\")\ncheck('half positive', solve(2.0*N+0.5), \"1\")\ncheck('half negative', solve(-2.0*N-0.5), \"-1\")\ncheck('quarter', solve(2.0*N+0.25), render(math.sqrt(0.5)))\ncheck('three quarters', solve(2.0*N+0.75), render(math.sqrt(0.5)))\ncheck('negative three quarters', solve(-2.0*N-0.75), render(-math.sqrt(0.5)))\ncheck('large integer', solve(2.0**52+N), \"0\")\ncheck('negative zero', solve(-0.0), \"-0\")\ncheck('near integer', solve(1.0-2.0**-40), render(math.sin(math.pi*2.0**-40)))\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":"fabfb987535b88608e96012318647de8228c3725f742f78a81f312040d754b4a","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        r=math.remainder(x,2.0)\n        if r==0 or abs(r)==1: return \"0\"\n        if r==0.5: return '1'\n        if r==-0.5: return '-1'\n        if r>0.5: r=1-r\n        elif r < -0.5: r=-1-r\n        return render(math.sin(math.pi*r))\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('remainder sign reversal', solve(3.0), \"0\")\ncheck('positive integer', solve(float(N)), \"0\")\ncheck('negative integer', solve(-float(N)), \"-0\")\ncheck('half positive', solve(2.0*N+0.5), \"1\")\ncheck('half negative', solve(-2.0*N-0.5), \"-1\")\ncheck('quarter', solve(2.0*N+0.25), render(math.sqrt(0.5)))\ncheck('three quarters', solve(2.0*N+0.75), render(math.sqrt(0.5)))\ncheck('negative three quarters', solve(-2.0*N-0.75), render(-math.sqrt(0.5)))\ncheck('large integer', solve(2.0**52+N), \"0\")\ncheck('negative zero', solve(-0.0), \"-0\")\ncheck('near integer', solve(1.0-2.0**-40), render(math.sin(math.pi*2.0**-40)))\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-sinpi-integer-zero-sign","generated_at":"2026-09-29T14:39:39.513670+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":"Sine-pi loses the sign of an exact integer zero. The faulty expression is if r==0 or abs(r)==1: return \"0\".","sha256":"890a541c679db16c4d33309f4b16340ed2bc30290b1375050e5ff8168e91d8cd","title":"Sine-pi loses the sign of an exact integer zero · 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":62.72,"exit_code":1,"observations":[{"actual":"-0","check":"remainder sign reversal","expected":"0","passed":false},{"actual":"0","check":"positive integer","expected":"0","passed":true},{"actual":"-0","check":"negative integer","expected":"-0","passed":true},{"actual":"1","check":"half positive","expected":"1","passed":true},{"actual":"-1","check":"half negative","expected":"-1","passed":true},{"actual":"0.70710678119","check":"quarter","expected":"0.70710678119","passed":true},{"actual":"0.70710678119","check":"three quarters","expected":"0.70710678119","passed":true},{"actual":"-0.70710678119","check":"negative three quarters","expected":"-0.70710678119","passed":true},{"actual":"0","check":"large integer","expected":"0","passed":true},{"actual":"-0","check":"negative zero","expected":"-0","passed":true},{"actual":"2.8572618736e-12","check":"near integer","expected":"2.8572618736e-12","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"remainder sign reversal\", \"actual\": \"-0\", \"expected\": \"0\", \"passed\": false}, {\"check\": \"positive integer\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"negative integer\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"half positive\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"half negative\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"quarter\", \"actual\": \"0.70710678119\", \"expected\": \"0.70710678119\", \"passed\": true}, {\"check\": \"three quarters\", \"actual\": \"0.70710678119\", \"expected\": \"0.70710678119\", \"passed\": true}, {\"check\": \"negative three quarters\", \"actual\": \"-0.70710678119\", \"expected\": \"-0.70710678119\", \"passed\": true}, {\"check\": \"large integer\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"near integer\", \"actual\": \"2.8572618736e-12\", \"expected\": \"2.8572618736e-12\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":52.345,"exit_code":1,"observations":[{"actual":"0","check":"remainder sign reversal","expected":"0","passed":true},{"actual":"0","check":"positive integer","expected":"0","passed":true},{"actual":"0","check":"negative integer","expected":"-0","passed":false},{"actual":"1","check":"half positive","expected":"1","passed":true},{"actual":"-1","check":"half negative","expected":"-1","passed":true},{"actual":"0.70710678119","check":"quarter","expected":"0.70710678119","passed":true},{"actual":"0.70710678119","check":"three quarters","expected":"0.70710678119","passed":true},{"actual":"-0.70710678119","check":"negative three quarters","expected":"-0.70710678119","passed":true},{"actual":"0","check":"large integer","expected":"0","passed":true},{"actual":"0","check":"negative zero","expected":"-0","passed":false},{"actual":"2.8572618736e-12","check":"near integer","expected":"2.8572618736e-12","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"remainder sign reversal\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"positive integer\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"negative integer\", \"actual\": \"0\", \"expected\": \"-0\", \"passed\": false}, {\"check\": \"half positive\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"half negative\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"quarter\", \"actual\": \"0.70710678119\", \"expected\": \"0.70710678119\", \"passed\": true}, {\"check\": \"three quarters\", \"actual\": \"0.70710678119\", \"expected\": \"0.70710678119\", \"passed\": true}, {\"check\": \"negative three quarters\", \"actual\": \"-0.70710678119\", \"expected\": \"-0.70710678119\", \"passed\": true}, {\"check\": \"large integer\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"0\", \"expected\": \"-0\", \"passed\": false}, {\"check\": \"near integer\", \"actual\": \"2.8572618736e-12\", \"expected\": \"2.8572618736e-12\", \"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."}}