FAILURE MAP
← Case archive

FA-5941 / Solid geometry / Open access

Cuboid space diagonal squared · case 01

Squaring the sum introduces cross terms.

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

ROOT CAUSE

Squaring the sum introduces cross terms.

VERIFIED REPAIR

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

Unsuccessful approach: A face diagonal omits the third dimension.

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. Cuboid space diagonal squared. Exact operational definition: a*a+b*b+c*c

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(a, b, c):
    return (a+b+c)**2
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2, 3, 6)', solve(*(2, 3, 6)), 49)
check('fixture 2: (1, 1, 1)', solve(*(1, 1, 1)), 3)
check('fixture 3: (0, 0, 0)', solve(*(0, 0, 0)), 0)
check('fixture 4: (0, 3, 4)', solve(*(0, 3, 4)), 25)
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: (2, 3, 6)12149Failed
fixture 2: (1, 1, 1)93Failed
fixture 3: (0, 0, 0)00Passed
fixture 4: (0, 3, 4)4925Failed

SHA-256 / aef54274d6ecf6585facfde4d9bb895f3dc55dd97a481e45868d0b1fe9468c10

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*a+b*b
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2, 3, 6)', solve(*(2, 3, 6)), 49)
check('fixture 2: (1, 1, 1)', solve(*(1, 1, 1)), 3)
check('fixture 3: (0, 0, 0)', solve(*(0, 0, 0)), 0)
check('fixture 4: (0, 3, 4)', solve(*(0, 3, 4)), 25)
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: (2, 3, 6)1349Failed
fixture 2: (1, 1, 1)23Failed
fixture 3: (0, 0, 0)00Passed
fixture 4: (0, 3, 4)925Failed

SHA-256 / 9c85163448c4084600703cd6d269e8b216f1013950f422dcaf446d7521af3bd5

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*a+b*b+c*c
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2, 3, 6)', solve(*(2, 3, 6)), 49)
check('fixture 2: (1, 1, 1)', solve(*(1, 1, 1)), 3)
check('fixture 3: (0, 0, 0)', solve(*(0, 0, 0)), 0)
check('fixture 4: (0, 3, 4)', solve(*(0, 3, 4)), 25)
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: (2, 3, 6)4949Passed
fixture 2: (1, 1, 1)33Passed
fixture 3: (0, 0, 0)00Passed
fixture 4: (0, 3, 4)2525Passed

SHA-256 / 5878a0d9ad132c111272a9e31da63d32d04b7263f7d4b13614b4f93cca8ee9c0

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

Case digest / 9eef0d351f8bbb9fe20ec4132f706e876684d707c8b18e2488007fc850e8d320