FAILURE MAP
← Case archive

FA-5976 / Solid geometry / Open access

Torus volume divided by pi squared · case 01

The major radius is squared instead of the tube radius.

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

ROOT CAUSE

The major radius is squared instead of the tube radius.

VERIFIED REPAIR

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

Unsuccessful approach: The revolution circumference factor loses two.

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 volume divided by pi squared. Exact operational definition: 2*major*minor*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*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)), 6)
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)), 108)
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)186Failed
fixture 2: (4, 2)6432Failed
fixture 3: (5, 0)00Passed
fixture 4: (6, 3)216108Failed

SHA-256 / f30226be0a8255a82d412e100599d60419be9203e7c00b36235e5e0de7adefe0

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 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)), 6)
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)), 108)
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)36Failed
fixture 2: (4, 2)1632Failed
fixture 3: (5, 0)00Passed
fixture 4: (6, 3)54108Failed

SHA-256 / e857944711c236900b806b942549a07e7b04416bdd1e2c5c6ea941711585bc27

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 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)), 6)
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)), 108)
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)66Passed
fixture 2: (4, 2)3232Passed
fixture 3: (5, 0)00Passed
fixture 4: (6, 3)108108Passed

SHA-256 / 11a2e5b2b6b6480f754b29a58bae898a41965760f610e3608ed2bedb17151a82

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

Case digest / 88c634363db43ba90dddabe87a0e81897a12db6683ee1775e1e8ef39612e5593