FAILURE MAP
← Case archive

FA-16211 / Floating-point arithmetic / Open access

Inverse tangent drops odd symmetry · case 01

Inverse tangent drops odd symmetry.

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

ROOT CAUSE

Inverse tangent drops odd symmetry. The faulty expression is return render(result).

THE FAILURE

Inverse tangent drops odd symmetry. The faulty expression is return render(result).

Unsuccessful approach: The attempted local correction return render(-result) still violates the explicit regression fixtures.

Case contract

Evaluate inverse hyperbolic tangent on [-1,1], with signed infinite endpoints and a domain marker outside. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.

Why this case matters

An offline floating representation model isolates a reproducible arithmetic fault.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x):
    try:
        if abs(x)>1: return 'domain'
        if x==1: return '+infinity'
        if x==-1: return '-infinity'
        if x==0: return render(x)
        a=abs(x)
        result=0.5*math.log1p(2*a/(1-a))
        return render(result)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('tiny positive', solve(N*2.0**-60), render(N*2.0**-60))
check('tiny negative', solve(-N*2.0**-60), render(-N*2.0**-60))
check('normal', solve(0.125*N), render(math.atanh(0.125*N)))
check('negative normal', solve(-0.125*N), render(math.atanh(-0.125*N)))
check('positive endpoint', solve(1.0), "+infinity")
check('negative endpoint', solve(-1.0), "-infinity")
check('invalid', solve(1.0+N), "domain")
check('negative zero', solve(-0.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
tiny positive8.6736173799e-198.6736173799e-19Passed
tiny negative8.6736173799e-19-8.6736173799e-19Failed
normal0.125657214140.12565721414Passed
negative normal0.12565721414-0.12565721414Failed
positive endpoint+infinity+infinityPassed
negative endpoint-infinity-infinityPassed
invaliddomaindomainPassed
negative zero-0-0Passed

SHA-256 / 1776cf8f37d38c9d0449e2d00f1135058674d645019b5de48f09f9b46898404e

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x):
    try:
        if abs(x)>1: return 'domain'
        if x==1: return '+infinity'
        if x==-1: return '-infinity'
        if x==0: return render(x)
        a=abs(x)
        result=0.5*math.log1p(2*a/(1-a))
        return render(-result)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('tiny positive', solve(N*2.0**-60), render(N*2.0**-60))
check('tiny negative', solve(-N*2.0**-60), render(-N*2.0**-60))
check('normal', solve(0.125*N), render(math.atanh(0.125*N)))
check('negative normal', solve(-0.125*N), render(math.atanh(-0.125*N)))
check('positive endpoint', solve(1.0), "+infinity")
check('negative endpoint', solve(-1.0), "-infinity")
check('invalid', solve(1.0+N), "domain")
check('negative zero', solve(-0.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
tiny positive-8.6736173799e-198.6736173799e-19Failed
tiny negative-8.6736173799e-19-8.6736173799e-19Passed
normal-0.125657214140.12565721414Failed
negative normal-0.12565721414-0.12565721414Passed
positive endpoint+infinity+infinityPassed
negative endpoint-infinity-infinityPassed
invaliddomaindomainPassed
negative zero-0-0Passed

SHA-256 / ba90fa47c7e0061265323cc4c4c448f60f14ae4118dcdda0a200df22d70f14b7

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 8 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

Controlled binary64 or explicitly stipulated miniature format; no hardware exception flags or platform floating environment are modeled. 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:39:34.357219+00:00.

Case digest / b4e9cb577a5939710632745120ce1f7f250ba25b23498e676ba288364899c468