FAILURE MAP
← Case archive

FA-5886 / Planar geometry / Open access

Squared heron area times sixteen · case 01

Two Heron factors are duplicated instead of respecting all three sides.

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

ROOT CAUSE

Two Heron factors are duplicated instead of respecting all three sides.

VERIFIED REPAIR

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

Unsuccessful approach: One of the four factors is omitted.

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. a,b,c satisfy the non-strict triangle inequality; return sixteen times triangle area squared. Exact operational definition: (a+b+c)*(-a+b+c)*(a-b+c)*(a+b-c)

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, c):
    return (a+b+c)*(a+b+c)*(a+b-c)*(a+b-c)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 4, 5)', solve(*(3, 4, 5)), 576)
check('fixture 2: (2, 2, 2)', solve(*(2, 2, 2)), 48)
check('fixture 3: (1, 2, 3)', solve(*(1, 2, 3)), 0)
check('fixture 4: (5, 5, 6)', solve(*(5, 5, 6)), 2304)
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, 4, 5)576576Passed
fixture 2: (2, 2, 2)14448Failed
fixture 3: (1, 2, 3)00Passed
fixture 4: (5, 5, 6)40962304Failed

SHA-256 / 9876e2ad357537848ade22ce90ad19ac4a9aaeb8864945f3c0fdf4c75b5f662d

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 (a+b+c)*(-a+b+c)*(a-b+c)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 4, 5)', solve(*(3, 4, 5)), 576)
check('fixture 2: (2, 2, 2)', solve(*(2, 2, 2)), 48)
check('fixture 3: (1, 2, 3)', solve(*(1, 2, 3)), 0)
check('fixture 4: (5, 5, 6)', solve(*(5, 5, 6)), 2304)
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, 4, 5)288576Failed
fixture 2: (2, 2, 2)2448Failed
fixture 3: (1, 2, 3)480Failed
fixture 4: (5, 5, 6)5762304Failed

SHA-256 / c3e2efe0d9bcd887e541e3920a9eab44afd1e5baf3ff97753f64b42238001370

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 (a+b+c)*(-a+b+c)*(a-b+c)*(a+b-c)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 4, 5)', solve(*(3, 4, 5)), 576)
check('fixture 2: (2, 2, 2)', solve(*(2, 2, 2)), 48)
check('fixture 3: (1, 2, 3)', solve(*(1, 2, 3)), 0)
check('fixture 4: (5, 5, 6)', solve(*(5, 5, 6)), 2304)
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, 4, 5)576576Passed
fixture 2: (2, 2, 2)4848Passed
fixture 3: (1, 2, 3)00Passed
fixture 4: (5, 5, 6)23042304Passed

SHA-256 / 2ec4aace3185c6d64b4adf0329923d5a05307fceae8f8b2b23c7328c109e026a

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

Case digest / aa8ca409ca9f88e67542521fea1d29ecad39bc1ed3f5c0dbdb7bdffe64e9466a