FAILURE MAP
← Case archive

FA-5761 / Planar geometry / Open access

Oriented triangle double area · case 01

The determinant adds its cross terms instead of subtracting.

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

ROOT CAUSE

The determinant adds its cross terms instead of subtracting.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return (b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])

Unsuccessful approach: Absolute area erases orientation required by the contract.

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. a,b,c are planar points; return twice signed triangle area, positive for counterclockwise order. Exact operational definition: (b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])

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(a, b, c):
    return (b[0]-a[0])*(c[1]-a[1])+(b[1]-a[1])*(c[0]-a[0])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ((0, 0), (2, 0), (0, 3))', solve(*((0, 0), (2, 0), (0, 3))), 6)
check('fixture 2: ((0, 0), (0, 3), (2, 0))', solve(*((0, 0), (0, 3), (2, 0))), -6)
check('fixture 3: ((1, 1), (2, 2), (3, 3))', solve(*((1, 1), (2, 2), (3, 3))), 0)
check('fixture 4: ((2, 1), (4, 3), (1, 5))', solve(*((2, 1), (4, 3), (1, 5))), 10)
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: ((0, 0), (2, 0), (0, 3))66Passed
fixture 2: ((0, 0), (0, 3), (2, 0))6-6Failed
fixture 3: ((1, 1), (2, 2), (3, 3))40Failed
fixture 4: ((2, 1), (4, 3), (1, 5))610Failed

SHA-256 / fa2ff03d853e291865156053303444a1eaa40e36402379e5ec8cda62a390c5f4

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 abs((b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0]))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ((0, 0), (2, 0), (0, 3))', solve(*((0, 0), (2, 0), (0, 3))), 6)
check('fixture 2: ((0, 0), (0, 3), (2, 0))', solve(*((0, 0), (0, 3), (2, 0))), -6)
check('fixture 3: ((1, 1), (2, 2), (3, 3))', solve(*((1, 1), (2, 2), (3, 3))), 0)
check('fixture 4: ((2, 1), (4, 3), (1, 5))', solve(*((2, 1), (4, 3), (1, 5))), 10)
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: ((0, 0), (2, 0), (0, 3))66Passed
fixture 2: ((0, 0), (0, 3), (2, 0))6-6Failed
fixture 3: ((1, 1), (2, 2), (3, 3))00Passed
fixture 4: ((2, 1), (4, 3), (1, 5))1010Passed

SHA-256 / 4263967e0e2b8c970f57114a41533c2f57fdb11a5458e5155c295bee2d6f5cbd

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 (b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ((0, 0), (2, 0), (0, 3))', solve(*((0, 0), (2, 0), (0, 3))), 6)
check('fixture 2: ((0, 0), (0, 3), (2, 0))', solve(*((0, 0), (0, 3), (2, 0))), -6)
check('fixture 3: ((1, 1), (2, 2), (3, 3))', solve(*((1, 1), (2, 2), (3, 3))), 0)
check('fixture 4: ((2, 1), (4, 3), (1, 5))', solve(*((2, 1), (4, 3), (1, 5))), 10)
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: ((0, 0), (2, 0), (0, 3))66Passed
fixture 2: ((0, 0), (0, 3), (2, 0))-6-6Passed
fixture 3: ((1, 1), (2, 2), (3, 3))00Passed
fixture 4: ((2, 1), (4, 3), (1, 5))1010Passed

SHA-256 / 790785ae0e3acf9724b95ea51e9963c343ceb80550cba5e4b47ebacd0959c2dd

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

Case digest / 8419208baf6a0877f0e29e7707c6f409fdbd75ca9577aea695a72b936bc812b8