FAILURE MAP
← Case archive

FA-5831 / Planar geometry / Open access

Regular polygon exterior angle · case 01

The interior angle is returned instead of its exterior turn.

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

ROOT CAUSE

The interior angle is returned instead of its exterior turn.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return 360/n

Unsuccessful approach: The full turn is halved.

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 exterior angle. Exact operational definition: 360/n

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-2)/n
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3,)', solve(*(3,)), 120)
check('fixture 2: (4,)', solve(*(4,)), 90)
check('fixture 3: (6,)', solve(*(6,)), 60)
check('fixture 4: (8,)', solve(*(8,)), 45)
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,)60.0120Failed
fixture 2: (4,)90.090Passed
fixture 3: (6,)120.060Failed
fixture 4: (8,)135.045Failed

SHA-256 / ac3af2694adb8473c01837e0cc266debfb43f05a7c228fcad703361a15a987fa

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 180/n
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3,)', solve(*(3,)), 120)
check('fixture 2: (4,)', solve(*(4,)), 90)
check('fixture 3: (6,)', solve(*(6,)), 60)
check('fixture 4: (8,)', solve(*(8,)), 45)
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,)60.0120Failed
fixture 2: (4,)45.090Failed
fixture 3: (6,)30.060Failed
fixture 4: (8,)22.545Failed

SHA-256 / 2cdc1f3a7b1508ae5ac8f2e2c7b3849d3c9d33b8be641dae30fb9bbbdc9e12ef

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 360/n
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3,)', solve(*(3,)), 120)
check('fixture 2: (4,)', solve(*(4,)), 90)
check('fixture 3: (6,)', solve(*(6,)), 60)
check('fixture 4: (8,)', solve(*(8,)), 45)
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,)120.0120Passed
fixture 2: (4,)90.090Passed
fixture 3: (6,)60.060Passed
fixture 4: (8,)45.045Passed

SHA-256 / c19169058e47dc25b7270c1e94bb7d0f6c48a0f33df61d0374378449808174f0

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

Case digest / 75420bc96ae7c9d65e553c05ceeac19d8cf76c16da1feaae8cb74e1bebc508f1