FAILURE MAP
← Case archive

FA-5826 / Planar geometry / Open access

Regular polygon interior angle sum · case 01

The triangulation has n minus two triangles, not n.

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

ROOT CAUSE

The triangulation has n minus two triangles, not n.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return 180*(n-2)

Unsuccessful approach: Exterior-angle sum is confused with interior-angle sum.

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. Regular polygon interior angle sum. Exact operational definition: 180*(n-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(n):
    return 180*n
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3,)', solve(*(3,)), 180)
check('fixture 2: (4,)', solve(*(4,)), 360)
check('fixture 3: (5,)', solve(*(5,)), 540)
check('fixture 4: (8,)', solve(*(8,)), 1080)
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,)540180Failed
fixture 2: (4,)720360Failed
fixture 3: (5,)900540Failed
fixture 4: (8,)14401080Failed

SHA-256 / 63e71351cf5410a270b25a2fba4d598dea43b1eee3653b4df44be05f1e2d69d9

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(n):
    return 360
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3,)', solve(*(3,)), 180)
check('fixture 2: (4,)', solve(*(4,)), 360)
check('fixture 3: (5,)', solve(*(5,)), 540)
check('fixture 4: (8,)', solve(*(8,)), 1080)
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,)360180Failed
fixture 2: (4,)360360Passed
fixture 3: (5,)360540Failed
fixture 4: (8,)3601080Failed

SHA-256 / 6e58eeb7c2a38c8586d0fa0c63af116b99276c714801f18b9bade0764644910d

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(n):
    return 180*(n-2)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3,)', solve(*(3,)), 180)
check('fixture 2: (4,)', solve(*(4,)), 360)
check('fixture 3: (5,)', solve(*(5,)), 540)
check('fixture 4: (8,)', solve(*(8,)), 1080)
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,)180180Passed
fixture 2: (4,)360360Passed
fixture 3: (5,)540540Passed
fixture 4: (8,)10801080Passed

SHA-256 / 5106160926d347355d0deb635679f9548d6fb8b2459c39449da338cd4c98f79e

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

Case digest / 6cd772b8ce962d857b7f34558c8a1cf1c543943b844613eb356bd5682ebdb056