{"abstract":"Log divided difference subtracts logarithms of adjacent large values.","category":"Floating-point arithmetic","checks":10,"contract":"Evaluate (log(b)-log(a))/(b-a) for positive finite endpoints with continuous limit 1/a. Close ratios use log1p; fixtures have finite outputs. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","contract_signature":"a,b","evaluation_group":"s3-float-log-divided-difference","failed_approach":"The attempted local correction result=math.log(b/a)/d still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-log-divided-difference-close-log-subtraction","id":"FA-17006","implementations":{"attempt":{"sha256":"39a84e74a2081d6b2ba63cec69300a9d498f6b73fc9f0089d74e67bd4c61fcad","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\ndef render(x):\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return '-infinity' if x<0 else '+infinity'\n    return format(x,'.11g')\n\nN = 1\nobservations = []\ndef solve(a,b):\n    try:\n        if a<=0 or b<=0: return 'domain'\n        if a==b: return render(1/a)\n        d=b-a\n        r=d/a\n        if abs(r)<0.5:\n            result=math.log(b/a)/d\n        else:\n            result=(math.log(b)-math.log(a))/d\n        return render(result)\n    except (ValueError, OverflowError, ZeroDivisionError, TypeError):\n        return \"arithmetic-error\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('coincident', solve(float(N),float(N)), render(1/N))\ncheck('close', solve(1.0,1.0+N*2.0**-50), render(math.log1p(N*2.0**-50)/(N*2.0**-50)))\ncheck('moderate close', solve(1.0,1.125), render(math.log(1.125)/0.125))\ncheck('far reverse', solve(1e300,1e-300), render((math.log(1e-300)-math.log(1e300))/(1e-300-1e300)))\ncheck('close large', solve(1e100,math.nextafter(1e100,math.inf)), render(1e-100))\ncheck('forward', solve(1.0,float(N+1)), render(math.log(N+1)/N))\ncheck('reverse', solve(float(N+1),1.0), render(math.log(N+1)/N))\ncheck('far', solve(1e-100,1e100), render((200*math.log(10))/(1e100-1e-100)))\ncheck('zero', solve(0.0,float(N)), \"domain\")\ncheck('negative', solve(float(N),-1.0), \"domain\")\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"303a814e961ef76b8dc74e563cd9ddaeb908331550a7b627bab116672dae4081","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\ndef render(x):\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return '-infinity' if x<0 else '+infinity'\n    return format(x,'.11g')\n\nN = 1\nobservations = []\ndef solve(a,b):\n    try:\n        if a<=0 or b<=0: return 'domain'\n        if a==b: return render(1/a)\n        d=b-a\n        r=d/a\n        if abs(r)<0.5:\n            result=(math.log(b)-math.log(a))/d\n        else:\n            result=(math.log(b)-math.log(a))/d\n        return render(result)\n    except (ValueError, OverflowError, ZeroDivisionError, TypeError):\n        return \"arithmetic-error\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('coincident', solve(float(N),float(N)), render(1/N))\ncheck('close', solve(1.0,1.0+N*2.0**-50), render(math.log1p(N*2.0**-50)/(N*2.0**-50)))\ncheck('moderate close', solve(1.0,1.125), render(math.log(1.125)/0.125))\ncheck('far reverse', solve(1e300,1e-300), render((math.log(1e-300)-math.log(1e300))/(1e-300-1e300)))\ncheck('close large', solve(1e100,math.nextafter(1e100,math.inf)), render(1e-100))\ncheck('forward', solve(1.0,float(N+1)), render(math.log(N+1)/N))\ncheck('reverse', solve(float(N+1),1.0), render(math.log(N+1)/N))\ncheck('far', solve(1e-100,1e100), render((200*math.log(10))/(1e100-1e-100)))\ncheck('zero', solve(0.0,float(N)), \"domain\")\ncheck('negative', solve(float(N),-1.0), \"domain\")\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-floating_point_arithmetic-log-divided-difference-close-log-subtraction","generated_at":"2026-09-29T14:39:42.309134+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline floating representation model isolates a reproducible arithmetic fault.","root_cause":"Log divided difference subtracts logarithms of adjacent large values. The faulty expression is result=(math.log(b)-math.log(a))/d.","sha256":"411d2fa36c6bf2341171d42cdb588b20f8c8619056495012854659001ffe0217","title":"Log divided difference subtracts logarithms of adjacent large values · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":45.402,"exit_code":1,"observations":[{"actual":"1","check":"coincident","expected":"1","passed":true},{"actual":"1","check":"close","expected":"1","passed":true},{"actual":"0.94226428525","check":"moderate close","expected":"0.94226428525","passed":true},{"actual":"1.3815510558e-297","check":"far reverse","expected":"1.3815510558e-297","passed":true},{"actual":"1.1429873913e-100","check":"close large","expected":"1e-100","passed":false},{"actual":"0.69314718056","check":"forward","expected":"0.69314718056","passed":true},{"actual":"0.69314718056","check":"reverse","expected":"0.69314718056","passed":true},{"actual":"4.605170186e-98","check":"far","expected":"4.605170186e-98","passed":true},{"actual":"domain","check":"zero","expected":"domain","passed":true},{"actual":"domain","check":"negative","expected":"domain","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"coincident\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"close\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"moderate close\", \"actual\": \"0.94226428525\", \"expected\": \"0.94226428525\", \"passed\": true}, {\"check\": \"far reverse\", \"actual\": \"1.3815510558e-297\", \"expected\": \"1.3815510558e-297\", \"passed\": true}, {\"check\": \"close large\", \"actual\": \"1.1429873913e-100\", \"expected\": \"1e-100\", \"passed\": false}, {\"check\": \"forward\", \"actual\": \"0.69314718056\", \"expected\": \"0.69314718056\", \"passed\": true}, {\"check\": \"reverse\", \"actual\": \"0.69314718056\", \"expected\": \"0.69314718056\", \"passed\": true}, {\"check\": \"far\", \"actual\": \"4.605170186e-98\", \"expected\": \"4.605170186e-98\", \"passed\": true}, {\"check\": \"zero\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.927,"exit_code":1,"observations":[{"actual":"1","check":"coincident","expected":"1","passed":true},{"actual":"1","check":"close","expected":"1","passed":true},{"actual":"0.94226428525","check":"moderate close","expected":"0.94226428525","passed":true},{"actual":"1.3815510558e-297","check":"far reverse","expected":"1.3815510558e-297","passed":true},{"actual":"0","check":"close large","expected":"1e-100","passed":false},{"actual":"0.69314718056","check":"forward","expected":"0.69314718056","passed":true},{"actual":"0.69314718056","check":"reverse","expected":"0.69314718056","passed":true},{"actual":"4.605170186e-98","check":"far","expected":"4.605170186e-98","passed":true},{"actual":"domain","check":"zero","expected":"domain","passed":true},{"actual":"domain","check":"negative","expected":"domain","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"coincident\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"close\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"moderate close\", \"actual\": \"0.94226428525\", \"expected\": \"0.94226428525\", \"passed\": true}, {\"check\": \"far reverse\", \"actual\": \"1.3815510558e-297\", \"expected\": \"1.3815510558e-297\", \"passed\": true}, {\"check\": \"close large\", \"actual\": \"0\", \"expected\": \"1e-100\", \"passed\": false}, {\"check\": \"forward\", \"actual\": \"0.69314718056\", \"expected\": \"0.69314718056\", \"passed\": true}, {\"check\": \"reverse\", \"actual\": \"0.69314718056\", \"expected\": \"0.69314718056\", \"passed\": true}, {\"check\": \"far\", \"actual\": \"4.605170186e-98\", \"expected\": \"4.605170186e-98\", \"passed\": true}, {\"check\": \"zero\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}