FAILURE MAP
← Case archive

FA-12151 / Astronomical coordinate conventions / Open access

A negative-zero declination loses its hemisphere · case 01

A negative-zero declination loses its hemisphere.

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

ROOT CAUSE

The degree magnitude is used to infer a sign stored separately.

VERIFIED REPAIR

Apply the explicit hemisphere sign to the entire sexagesimal magnitude.

Unsuccessful approach: Applying the sign only to degree terms leaves the fractional arc positive.

Case contract

Input sign is + or -, d is nonnegative degrees, m and s are 0..59; return signed arcseconds including when d is zero.

Why this case matters

Astronomical catalog and observation adapters must preserve the declared coordinate convention across software boundaries.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(sign, d, m, s):
    return d*3600+m*60+s
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('southern zero degree', solve("-", 0, N, 2), -60*N-2)
check('southern whole degree', solve("-", N, 0, 0), -3600*N)
check('southern fraction', solve("-", N, 1, 2), -3600*N-62)
check('north', solve("+", N, 1, 2), 3600*N+62)
check('origin', solve("-", 0, 0, 0), 0)
check('last minute', solve("-", 0, 59, 59), -3599)
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
southern zero degree62-62Failed
southern whole degree3600-3600Failed
southern fraction3662-3662Failed
north36623662Passed
origin00Passed
last minute3599-3599Failed

SHA-256 / 45b47a0f8ab779300a6e0b42a3282d8da8e91e5e759949ba65b310bddd1d3066

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(sign, d, m, s):
    return (-d if sign == '-' else d)*3600+m*60+s
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('southern zero degree', solve("-", 0, N, 2), -60*N-2)
check('southern whole degree', solve("-", N, 0, 0), -3600*N)
check('southern fraction', solve("-", N, 1, 2), -3600*N-62)
check('north', solve("+", N, 1, 2), 3600*N+62)
check('origin', solve("-", 0, 0, 0), 0)
check('last minute', solve("-", 0, 59, 59), -3599)
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
southern zero degree62-62Failed
southern whole degree-3600-3600Passed
southern fraction-3538-3662Failed
north36623662Passed
origin00Passed
last minute3599-3599Failed

SHA-256 / 69a8d26679bdf0e53d8c63a5269a5d02b6c42a017925606d892a8fcf38935e12

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(sign, d, m, s):
    return (-1 if sign == '-' else 1)*(d*3600+m*60+s)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('southern zero degree', solve("-", 0, N, 2), -60*N-2)
check('southern whole degree', solve("-", N, 0, 0), -3600*N)
check('southern fraction', solve("-", N, 1, 2), -3600*N-62)
check('north', solve("+", N, 1, 2), 3600*N+62)
check('origin', solve("-", 0, 0, 0), 0)
check('last minute', solve("-", 0, 59, 59), -3599)
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
southern zero degree-62-62Passed
southern whole degree-3600-3600Passed
southern fraction-3662-3662Passed
north36623662Passed
origin00Passed
last minute-3599-3599Passed

SHA-256 / 9030f601da3a7543fa4c0b8c8f7bd2f0f4d90798e48841b7015c1ea1d36f0925

Verification & scope

Deterministic stipulated adapter model; no ephemeris, physical accuracy, or production astronomy library claims. 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:38:54.321749+00:00.

Case digest / c5ef757ed344ada1078e709db350362400db4c4efe732f06af816912bacb6030