{"abstract":"Interpolation clamps a decreasing interval as though increasing.","category":"Floating-point arithmetic","checks":10,"contract":"Interpolate finite a and b at t in [0,1], preserving endpoints and avoiding overflow in a difference or an endpoint sum. Return domain marker outside the interval. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","contract_signature":"a,b,t","evaluation_group":"s3-float-lerp","failed_approach":"The attempted local correction result=max(a,min(b,result)) still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-lerp-direction-clamp","id":"FA-16706","implementations":{"attempt":{"sha256":"850ece1676355fde272f1e4141666effd94108503c88ccacb8ec7971aeedc888","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,t):\n    try:\n        if not 0<=t<=1: return 'domain'\n        if t==0: return render(a)\n        if t==1: return render(b)\n        if (a<=0<=b) or (b<=0<=a):\n            result=(1-t)*a+t*b\n        else:\n            result=a+t*(b-a)\n        result=max(a,min(b,result))\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('opposite asymmetric', solve(-float(N),float(N),0.25), render(-N/2))\ncheck('opposite extremes', solve(-1e308,1e308,0.5), \"0\")\ncheck('same extremes', solve(1e308,1.5e308,0.5), render(1.25e308))\ncheck('first endpoint', solve(-0.0,float(N),0.0), \"-0\")\ncheck('last endpoint', solve(float(N),-0.0,1.0), \"-0\")\ncheck('increasing', solve(float(N),float(N+8),0.25), render(N+2))\ncheck('decreasing', solve(float(N+8),float(N),0.25), render(N+6))\ncheck('negative same sign', solve(-float(N+8),-float(N),0.25), render(-N-6))\ncheck('outside', solve(float(N),float(N+8),1.5), \"domain\")\ncheck('tiny blend', solve(N*1e-300,3*N*1e-300,0.5), render(2*N*1e-300))\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":"e00f7f7ec6bc5e8c6fd94a64c39212d73e4717cb4566b435d667215a5a71ba9f","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,t):\n    try:\n        if not 0<=t<=1: return 'domain'\n        if t==0: return render(a)\n        if t==1: return render(b)\n        if (a<=0<=b) or (b<=0<=a):\n            result=(1-t)*a+t*b\n        else:\n            result=a+t*(b-a)\n        result=min(b,max(a,result))\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('opposite asymmetric', solve(-float(N),float(N),0.25), render(-N/2))\ncheck('opposite extremes', solve(-1e308,1e308,0.5), \"0\")\ncheck('same extremes', solve(1e308,1.5e308,0.5), render(1.25e308))\ncheck('first endpoint', solve(-0.0,float(N),0.0), \"-0\")\ncheck('last endpoint', solve(float(N),-0.0,1.0), \"-0\")\ncheck('increasing', solve(float(N),float(N+8),0.25), render(N+2))\ncheck('decreasing', solve(float(N+8),float(N),0.25), render(N+6))\ncheck('negative same sign', solve(-float(N+8),-float(N),0.25), render(-N-6))\ncheck('outside', solve(float(N),float(N+8),1.5), \"domain\")\ncheck('tiny blend', solve(N*1e-300,3*N*1e-300,0.5), render(2*N*1e-300))\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-lerp-direction-clamp","generated_at":"2026-09-29T14:39:38.838009+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":"Interpolation clamps a decreasing interval as though increasing. The faulty expression is result=min(b,max(a,result)).","sha256":"374caf5d776e3d784bfb50c44515721090453036c101ff71f52d9af9bfb44649","title":"Interpolation clamps a decreasing interval as though increasing · 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":41.893,"exit_code":1,"observations":[{"actual":"-0.5","check":"opposite asymmetric","expected":"-0.5","passed":true},{"actual":"0","check":"opposite extremes","expected":"0","passed":true},{"actual":"1.25e+308","check":"same extremes","expected":"1.25e+308","passed":true},{"actual":"-0","check":"first endpoint","expected":"-0","passed":true},{"actual":"-0","check":"last endpoint","expected":"-0","passed":true},{"actual":"3","check":"increasing","expected":"3","passed":true},{"actual":"9","check":"decreasing","expected":"7","passed":false},{"actual":"-7","check":"negative same sign","expected":"-7","passed":true},{"actual":"domain","check":"outside","expected":"domain","passed":true},{"actual":"2e-300","check":"tiny blend","expected":"2e-300","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"opposite asymmetric\", \"actual\": \"-0.5\", \"expected\": \"-0.5\", \"passed\": true}, {\"check\": \"opposite extremes\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"same extremes\", \"actual\": \"1.25e+308\", \"expected\": \"1.25e+308\", \"passed\": true}, {\"check\": \"first endpoint\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"last endpoint\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"increasing\", \"actual\": \"3\", \"expected\": \"3\", \"passed\": true}, {\"check\": \"decreasing\", \"actual\": \"9\", \"expected\": \"7\", \"passed\": false}, {\"check\": \"negative same sign\", \"actual\": \"-7\", \"expected\": \"-7\", \"passed\": true}, {\"check\": \"outside\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"tiny blend\", \"actual\": \"2e-300\", \"expected\": \"2e-300\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.928,"exit_code":1,"observations":[{"actual":"-0.5","check":"opposite asymmetric","expected":"-0.5","passed":true},{"actual":"0","check":"opposite extremes","expected":"0","passed":true},{"actual":"1.25e+308","check":"same extremes","expected":"1.25e+308","passed":true},{"actual":"-0","check":"first endpoint","expected":"-0","passed":true},{"actual":"-0","check":"last endpoint","expected":"-0","passed":true},{"actual":"3","check":"increasing","expected":"3","passed":true},{"actual":"1","check":"decreasing","expected":"7","passed":false},{"actual":"-7","check":"negative same sign","expected":"-7","passed":true},{"actual":"domain","check":"outside","expected":"domain","passed":true},{"actual":"2e-300","check":"tiny blend","expected":"2e-300","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"opposite asymmetric\", \"actual\": \"-0.5\", \"expected\": \"-0.5\", \"passed\": true}, {\"check\": \"opposite extremes\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"same extremes\", \"actual\": \"1.25e+308\", \"expected\": \"1.25e+308\", \"passed\": true}, {\"check\": \"first endpoint\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"last endpoint\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}, {\"check\": \"increasing\", \"actual\": \"3\", \"expected\": \"3\", \"passed\": true}, {\"check\": \"decreasing\", \"actual\": \"1\", \"expected\": \"7\", \"passed\": false}, {\"check\": \"negative same sign\", \"actual\": \"-7\", \"expected\": \"-7\", \"passed\": true}, {\"check\": \"outside\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"tiny blend\", \"actual\": \"2e-300\", \"expected\": \"2e-300\", \"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."}}