FAILURE MAP
← Case archive

FA-5981 / Solid geometry / Open access

Torus area divided by pi squared · case 01

The torus volume formula replaces surface area.

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

ROOT CAUSE

The torus volume formula replaces surface area.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return 4*major*minor

Unsuccessful approach: Adding radii does not multiply the two circumference factors.

Case contract

Nonnegative integer dimensions; exact products and ordinary Python real division. Quantities named divided by pi or pi-squared deliberately omit that factor from the returned result. major>=minor>=0; return ring-torus surface area divided by pi squared. Exact operational definition: 4*major*minor

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Solid 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(major, minor):
    return 2*major*minor*minor
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 1)', solve(*(3, 1)), 12)
check('fixture 2: (4, 2)', solve(*(4, 2)), 32)
check('fixture 3: (5, 0)', solve(*(5, 0)), 0)
check('fixture 4: (6, 3)', solve(*(6, 3)), 72)
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, 1)612Failed
fixture 2: (4, 2)3232Passed
fixture 3: (5, 0)00Passed
fixture 4: (6, 3)10872Failed

SHA-256 / dfa285498f3f550dd863b38b1285045fe88fab3ee4b9d19dd789ea683234e630

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(major, minor):
    return 2*(major+minor)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 1)', solve(*(3, 1)), 12)
check('fixture 2: (4, 2)', solve(*(4, 2)), 32)
check('fixture 3: (5, 0)', solve(*(5, 0)), 0)
check('fixture 4: (6, 3)', solve(*(6, 3)), 72)
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, 1)812Failed
fixture 2: (4, 2)1232Failed
fixture 3: (5, 0)100Failed
fixture 4: (6, 3)1872Failed

SHA-256 / 324e1afa0b519eb17ebf0a07dd4486ac8bfc999fb57cd4c3abc61ec42ce60722

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(major, minor):
    return 4*major*minor
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (3, 1)', solve(*(3, 1)), 12)
check('fixture 2: (4, 2)', solve(*(4, 2)), 32)
check('fixture 3: (5, 0)', solve(*(5, 0)), 0)
check('fixture 4: (6, 3)', solve(*(6, 3)), 72)
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, 1)1212Passed
fixture 2: (4, 2)3232Passed
fixture 3: (5, 0)00Passed
fixture 4: (6, 3)7272Passed

SHA-256 / 9069aa049ed7b3d08ded53840fbde7cd08dbc06ce08c0826be5dcea5a2d3d3e6

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

Case digest / e8b035693c368914b01e8d5b096e0a6b1a4f557cbf77da3675928598acb5376b