FA-6141 / Polynomial arithmetic / Open access
Quadratic root product rational · case 01
The product receives an unnecessary sign flip.
ROOT CAUSE
The product receives an unnecessary sign flip.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return str(Fraction(c,a))
Unsuccessful approach: The linear coefficient is used as the normalization denominator.
Case contract
Integer coefficients in ascending power order and integer evaluation bounds; missing high-degree coefficients are zero. Rational outputs are reduced Fraction strings; the zero-polynomial degree is -1. a!=0; return the reduced rational product of both algebraic roots. Exact operational definition: str(Fraction(c,a))
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Polynomial arithmetic results depend on the stated convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, b, c):
return str(Fraction(-c,a))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 3, 2)', solve(*(1, 3, 2)), '2')
check('fixture 2: (2, -3, 1)', solve(*(2, -3, 1)), '1/2')
check('fixture 3: (1, 0, -1)', solve(*(1, 0, -1)), '-1')
check('fixture 4: (-2, 4, 1)', solve(*(-2, 4, 1)), '-1/2')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (1, 3, 2) | -2 | 2 | Failed |
| fixture 2: (2, -3, 1) | -1/2 | 1/2 | Failed |
| fixture 3: (1, 0, -1) | 1 | -1 | Failed |
| fixture 4: (-2, 4, 1) | 1/2 | -1/2 | Failed |
SHA-256 / 4217251d8b4c57e8cfd62c46904de5fb8c469445d731d43302cecc72572035b3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, b, c):
return str(Fraction(c,b)) if b else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 3, 2)', solve(*(1, 3, 2)), '2')
check('fixture 2: (2, -3, 1)', solve(*(2, -3, 1)), '1/2')
check('fixture 3: (1, 0, -1)', solve(*(1, 0, -1)), '-1')
check('fixture 4: (-2, 4, 1)', solve(*(-2, 4, 1)), '-1/2')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (1, 3, 2) | 2/3 | 2 | Failed |
| fixture 2: (2, -3, 1) | -1/3 | 1/2 | Failed |
| fixture 3: (1, 0, -1) | None | -1 | Failed |
| fixture 4: (-2, 4, 1) | 1/4 | -1/2 | Failed |
SHA-256 / e84c8255a7dc7b9bbf1dd866851e22a57f36bc85d6b941fc7992567c7859c3a4
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, b, c):
return str(Fraction(c,a))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 3, 2)', solve(*(1, 3, 2)), '2')
check('fixture 2: (2, -3, 1)', solve(*(2, -3, 1)), '1/2')
check('fixture 3: (1, 0, -1)', solve(*(1, 0, -1)), '-1')
check('fixture 4: (-2, 4, 1)', solve(*(-2, 4, 1)), '-1/2')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (1, 3, 2) | 2 | 2 | Passed |
| fixture 2: (2, -3, 1) | 1/2 | 1/2 | Passed |
| fixture 3: (1, 0, -1) | -1 | -1 | Passed |
| fixture 4: (-2, 4, 1) | -1/2 | -1/2 | Passed |
SHA-256 / 7a35a528864de4855fbd90e91ba03b7ddc20c592506e91b3d182550d80a00184
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:37:57.889317+00:00.
Case digest / eb6961ad00cbd29af2e00e897d00284c9dc58bd8407fd4a65a4f9036a092d696