FAILURE MAP
← Case archive

FA-5811 / Planar geometry / Open access

Trapezoid area · case 01

The sum of parallel bases is not averaged.

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

ROOT CAUSE

The sum of parallel bases is not averaged.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return (a+b)*h/2

Unsuccessful approach: The bases multiply instead of adding.

Case contract

Integer coordinates and lengths, with exact arithmetic except for indicated division results. Lengths are nonnegative. Rectangles are (xmin,ymin,xmax,ymax) with ordered bounds; coordinate vectors have matching dimensions. Trapezoid area. Exact operational definition: (a+b)*h/2

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Planar geometry 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, h):
    return (a+b)*h
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 5, 2)', solve(*(3, 5, 2)), 8)
check('fixture 2: (2, 2, 3)', solve(*(2, 2, 3)), 6)
check('fixture 3: (0, 4, 2)', solve(*(0, 4, 2)), 4)
check('fixture 4: (3, 5, 0)', solve(*(3, 5, 0)), 0)
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: (3, 5, 2)168Failed
fixture 2: (2, 2, 3)126Failed
fixture 3: (0, 4, 2)84Failed
fixture 4: (3, 5, 0)00Passed

SHA-256 / 9156765183358409ce4e4d885e90ff7ac1e9f219e3baf4c7ff4d6262b64b022f

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, h):
    return a*b*h/2
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 5, 2)', solve(*(3, 5, 2)), 8)
check('fixture 2: (2, 2, 3)', solve(*(2, 2, 3)), 6)
check('fixture 3: (0, 4, 2)', solve(*(0, 4, 2)), 4)
check('fixture 4: (3, 5, 0)', solve(*(3, 5, 0)), 0)
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: (3, 5, 2)15.08Failed
fixture 2: (2, 2, 3)6.06Passed
fixture 3: (0, 4, 2)0.04Failed
fixture 4: (3, 5, 0)0.00Passed

SHA-256 / 67fdcd6705ddfc1d281245bead16d8ea3975d73ff243171d012608956b3392be

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, h):
    return (a+b)*h/2
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 5, 2)', solve(*(3, 5, 2)), 8)
check('fixture 2: (2, 2, 3)', solve(*(2, 2, 3)), 6)
check('fixture 3: (0, 4, 2)', solve(*(0, 4, 2)), 4)
check('fixture 4: (3, 5, 0)', solve(*(3, 5, 0)), 0)
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: (3, 5, 2)8.08Passed
fixture 2: (2, 2, 3)6.06Passed
fixture 3: (0, 4, 2)4.04Passed
fixture 4: (3, 5, 0)0.00Passed

SHA-256 / dda14603033fc01bdf11d53c234aec10e80601feab1342a3353461f2ded52014

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

Case digest / aa597fcd03c85b5369e145e5664e33837745799737a6ec083c8a5d861878b63f