FAILURE MAP
← Case archive

FA-5866 / Planar geometry / Open access

Point projection onto vector · case 01

Projection divides by vector magnitude in the wrong norm.

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

ROOT CAUSE

Projection divides by vector magnitude in the wrong norm.

THE FAILURE

Projection divides by vector magnitude in the wrong norm.

Unsuccessful approach: The projection coefficient is returned without multiplying by the direction.

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. p and v are same-length integer vectors and v is nonzero. Return reduced Fraction strings for the orthogonal projection onto span(v). Exact operational definition: [str(Fraction(sum(a*b for a,b in zip(p,v))*x,sum(x*x for x in v))) for x in v]

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(p, v):
    return [str(Fraction(sum(a*b for a,b in zip(p,v))*x,sum(abs(x) for x in v))) for x in v]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ((2, 3), (1, 0))', solve(*((2, 3), (1, 0))), ['2', '0'])
check('fixture 2: ((2, 3), (1, 1))', solve(*((2, 3), (1, 1))), ['5/2', '5/2'])
check('fixture 3: ((1, 0), (2, 0))', solve(*((1, 0), (2, 0))), ['1', '0'])
check('fixture 4: ((0, 0), (1, 2))', solve(*((0, 0), (1, 2))), ['0', '0'])
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), (1, 0))['2', '0']['2', '0']Passed
fixture 2: ((2, 3), (1, 1))['5/2', '5/2']['5/2', '5/2']Passed
fixture 3: ((1, 0), (2, 0))['2', '0']['1', '0']Failed
fixture 4: ((0, 0), (1, 2))['0', '0']['0', '0']Passed

SHA-256 / 4c0dd9734f1dc423769112946e6934bcf787a9d4fb5179569e3ad9a7fca4339b

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(p, v):
    return [str(Fraction(sum(a*b for a,b in zip(p,v)),sum(x*x for x in v))) for x in v]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ((2, 3), (1, 0))', solve(*((2, 3), (1, 0))), ['2', '0'])
check('fixture 2: ((2, 3), (1, 1))', solve(*((2, 3), (1, 1))), ['5/2', '5/2'])
check('fixture 3: ((1, 0), (2, 0))', solve(*((1, 0), (2, 0))), ['1', '0'])
check('fixture 4: ((0, 0), (1, 2))', solve(*((0, 0), (1, 2))), ['0', '0'])
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), (1, 0))['2', '2']['2', '0']Failed
fixture 2: ((2, 3), (1, 1))['5/2', '5/2']['5/2', '5/2']Passed
fixture 3: ((1, 0), (2, 0))['1/2', '1/2']['1', '0']Failed
fixture 4: ((0, 0), (1, 2))['0', '0']['0', '0']Passed

SHA-256 / 1e9a7fc06244a34ca4ae3c8ddbde5dd04da1069ef205889d637615c0b3de3b08

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 4 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / ce100e34b1f2ffca6ceaf97f320e65ccb2034afecb4646157fc2ead531668555