FAILURE MAP
← Case archive

FA-6136 / Polynomial arithmetic / Open access

Quadratic root sum rational · case 01

Vieta root sum has the opposite sign.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Vieta root sum has the opposite sign.

THE FAILURE

Vieta root sum has the opposite sign.

Unsuccessful approach: The single-root quadratic denominator is reused for a root sum.

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 sum of both algebraic roots, including complex roots counted algebraically. Exact operational definition: str(Fraction(-b,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(b,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)), '-3')
check('fixture 2: (2, -3, 1)', solve(*(2, -3, 1)), '3/2')
check('fixture 3: (1, 0, -1)', solve(*(1, 0, -1)), '0')
check('fixture 4: (-2, 4, 1)', solve(*(-2, 4, 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 fixtureActualExpectedOutcome
fixture 1: (1, 3, 2)3-3Failed
fixture 2: (2, -3, 1)-3/23/2Failed
fixture 3: (1, 0, -1)00Passed
fixture 4: (-2, 4, 1)-22Failed

SHA-256 / df8968773d1b92b4cb1ef78ea2ba8366c8d4a9b4f730aef272be6dfb74b03f08

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(-b,2*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)), '-3')
check('fixture 2: (2, -3, 1)', solve(*(2, -3, 1)), '3/2')
check('fixture 3: (1, 0, -1)', solve(*(1, 0, -1)), '0')
check('fixture 4: (-2, 4, 1)', solve(*(-2, 4, 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 fixtureActualExpectedOutcome
fixture 1: (1, 3, 2)-3/2-3Failed
fixture 2: (2, -3, 1)3/43/2Failed
fixture 3: (1, 0, -1)00Passed
fixture 4: (-2, 4, 1)12Failed

SHA-256 / 29c51ab037b3e91d6e7c08b2365601f64f6036676357c6ffaa891de91145816a

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 4 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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.855184+00:00.

Case digest / e277fd5fad088e68da8398f2908426e958771f30b744280ef7c3b9d369d896dd