{"abstract":"A CG beyond the certified trim table produces a plausible-looking trim setting.","category":"Aviation weight and balance","checks":11,"contract":"Input {'pmac','flaps','tables':{flap string:[[%MAC, trim units] ascending]}}. Missing flap table -> 'ERR_FLAPS'; %MAC outside the table's inclusive range -> 'ERR_RANGE' (no extrapolation or clamping); otherwise linear interpolation between bracketing nodes, rounded to 0.1 unit.","evaluation_group":"w2-aviation-weight-balance-stab-trim-lookup","failed_approach":"A one-percent clamping tolerance still invents trim settings for uncertified CGs.","family":"w2-aviation-weight-balance-stab-trim-lookup-trim-clamp","id":"FA-66151","implementations":{"attempt":{"sha256":"dba47353988600094491c9a6dff39e74f4664d0d4bc7b8c537a5081474fe95dd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    tables = x['tables']\n    key = str(x['flaps'])\n    if key not in tables: return 'ERR_FLAPS'\n    t = tables[key]\n    p = x['pmac']\n    if p < t[0][0] - 1 or p > t[-1][0] + 1: return 'ERR_RANGE'\n    p = min(max(p, t[0][0]), t[-1][0])\n    for (p0, u0), (p1, u1) in zip(t, t[1:]):\n        if p0 <= p <= p1:\n            u = u0 + (u1 - u0) * (p - p0) / (p1 - p0)\n            return round(u, 1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['mid table flaps 5', {'pmac': 19.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.4], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.5, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 11, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 17.23, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.7], ['sampled case 2', {'pmac': 11.67, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.1], ['sampled case 3', {'pmac': 23.34, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8]], [['mid table flaps 5', {'pmac': 20.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.3], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.6, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 12, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 32.69, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 17.85, 'flaps': 20, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 3', {'pmac': 7.44, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE']], [['mid table flaps 5', {'pmac': 21.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.1], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.699999999999996, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 13, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 13.07, 'flaps': 10, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 13.47, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.9], ['sampled case 3', {'pmac': 38.52, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 22.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.8, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 14, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 27.81, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.9], ['sampled case 2', {'pmac': 14.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.2], ['sampled case 3', {'pmac': 6.07, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 23.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.9, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 15.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.0], ['sampled case 2', {'pmac': 26.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.0], ['sampled case 3', {'pmac': 25.32, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.2]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\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":"c06709c4924715e4b27d6a2cd3241c22c4c8800fc866b75fd859f4ddf9597b40","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    tables = x['tables']\n    key = str(x['flaps'])\n    if key not in tables: return 'ERR_FLAPS'\n    t = tables[key]\n    p = x['pmac']\n    p = min(max(p, t[0][0]), t[-1][0])\n    for (p0, u0), (p1, u1) in zip(t, t[1:]):\n        if p0 <= p <= p1:\n            u = u0 + (u1 - u0) * (p - p0) / (p1 - p0)\n            return round(u, 1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['mid table flaps 5', {'pmac': 19.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.4], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.5, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 11, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 17.23, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.7], ['sampled case 2', {'pmac': 11.67, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.1], ['sampled case 3', {'pmac': 23.34, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8]], [['mid table flaps 5', {'pmac': 20.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.3], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.6, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 12, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 32.69, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 17.85, 'flaps': 20, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 3', {'pmac': 7.44, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE']], [['mid table flaps 5', {'pmac': 21.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.1], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.699999999999996, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 13, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 13.07, 'flaps': 10, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 13.47, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.9], ['sampled case 3', {'pmac': 38.52, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 22.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.8, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 14, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 27.81, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.9], ['sampled case 2', {'pmac': 14.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.2], ['sampled case 3', {'pmac': 6.07, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 23.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.9, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 15.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.0], ['sampled case 2', {'pmac': 26.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.0], ['sampled case 3', {'pmac': 25.32, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.2]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\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"},"fixed":{"sha256":"2ba317ddf29b1d1404863f657f5c9160e087c6003cdc00f2773195622a8cefd0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    tables = x['tables']\n    key = str(x['flaps'])\n    if key not in tables: return 'ERR_FLAPS'\n    t = tables[key]\n    p = x['pmac']\n    if p < t[0][0] or p > t[-1][0]: return 'ERR_RANGE'\n    for (p0, u0), (p1, u1) in zip(t, t[1:]):\n        if p0 <= p <= p1:\n            u = u0 + (u1 - u0) * (p - p0) / (p1 - p0)\n            return round(u, 1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['mid table flaps 5', {'pmac': 19.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.4], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.5, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 11, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 17.23, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.7], ['sampled case 2', {'pmac': 11.67, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.1], ['sampled case 3', {'pmac': 23.34, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8]], [['mid table flaps 5', {'pmac': 20.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.3], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.6, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 12, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 32.69, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 17.85, 'flaps': 20, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 3', {'pmac': 7.44, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE']], [['mid table flaps 5', {'pmac': 21.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.1], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.699999999999996, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 13, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 13.07, 'flaps': 10, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 13.47, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.9], ['sampled case 3', {'pmac': 38.52, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 22.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.8, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 14, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 27.81, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.9], ['sampled case 2', {'pmac': 14.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.2], ['sampled case 3', {'pmac': 6.07, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 23.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.9, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 15.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.0], ['sampled case 2', {'pmac': 26.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.0], ['sampled case 3', {'pmac': 25.32, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.2]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\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":"A deterministic toy loading model with stipulated constants; it is not an approved aircraft flight manual procedure and makes no claim of regulatory conformance. 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":"w2-aviation-weight-balance-stab-trim-lookup-trim-clamp","generated_at":"2026-09-29T14:47:40.469162+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Takeoff stabilizer trim is read from a flap-specific table indexed by %MAC; out-of-table values must not be silently clamped.","repair":"Return ERR_RANGE for any %MAC outside the table.","root_cause":"Values outside the table are clamped to the end nodes instead of being rejected.","sha256":"ef2d100b70a88943fe59da8a7934e2579c7689f14f5c0cec5ec462f0155cdc49","title":"Out-of-table CG clamped to the nearest trim value · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.65,"exit_code":1,"observations":[{"actual":5.4,"check":"mid table flaps 5","expected":5.4,"passed":true},{"actual":5.0,"check":"exact node","expected":5.0,"passed":true},{"actual":6.6,"check":"forward end of table","expected":6.6,"passed":true},{"actual":2.9,"check":"aft end of table","expected":2.9,"passed":true},{"actual":2.4,"check":"aft of table","expected":"ERR_RANGE","passed":false},{"actual":6.6,"check":"forward of table","expected":"ERR_RANGE","passed":false},{"actual":"ERR_FLAPS","check":"flap setting without table","expected":"ERR_FLAPS","passed":true},{"actual":3.7,"check":"flaps 15 between nodes","expected":3.7,"passed":true},{"actual":5.7,"check":"sampled case 1","expected":5.7,"passed":true},{"actual":6.1,"check":"sampled case 2","expected":6.1,"passed":true},{"actual":4.8,"check":"sampled case 3","expected":4.8,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mid table flaps 5\", \"actual\": 5.4, \"expected\": 5.4, \"passed\": true}, {\"check\": \"exact node\", \"actual\": 5.0, \"expected\": 5.0, \"passed\": true}, {\"check\": \"forward end of table\", \"actual\": 6.6, \"expected\": 6.6, \"passed\": true}, {\"check\": \"aft end of table\", \"actual\": 2.9, \"expected\": 2.9, \"passed\": true}, {\"check\": \"aft of table\", \"actual\": 2.4, \"expected\": \"ERR_RANGE\", \"passed\": false}, {\"check\": \"forward of table\", \"actual\": 6.6, \"expected\": \"ERR_RANGE\", \"passed\": false}, {\"check\": \"flap setting without table\", \"actual\": \"ERR_FLAPS\", \"expected\": \"ERR_FLAPS\", \"passed\": true}, {\"check\": \"flaps 15 between nodes\", \"actual\": 3.7, \"expected\": 3.7, \"passed\": true}, {\"check\": \"sampled case 1\", \"actual\": 5.7, \"expected\": 5.7, \"passed\": true}, {\"check\": \"sampled case 2\", \"actual\": 6.1, \"expected\": 6.1, \"passed\": true}, {\"check\": \"sampled case 3\", \"actual\": 4.8, \"expected\": 4.8, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.566,"exit_code":1,"observations":[{"actual":5.4,"check":"mid table flaps 5","expected":5.4,"passed":true},{"actual":5.0,"check":"exact node","expected":5.0,"passed":true},{"actual":6.6,"check":"forward end of table","expected":6.6,"passed":true},{"actual":2.9,"check":"aft end of table","expected":2.9,"passed":true},{"actual":2.4,"check":"aft of table","expected":"ERR_RANGE","passed":false},{"actual":6.6,"check":"forward of table","expected":"ERR_RANGE","passed":false},{"actual":"ERR_FLAPS","check":"flap setting without table","expected":"ERR_FLAPS","passed":true},{"actual":3.7,"check":"flaps 15 between nodes","expected":3.7,"passed":true},{"actual":5.7,"check":"sampled case 1","expected":5.7,"passed":true},{"actual":6.1,"check":"sampled case 2","expected":6.1,"passed":true},{"actual":4.8,"check":"sampled case 3","expected":4.8,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mid table flaps 5\", \"actual\": 5.4, \"expected\": 5.4, \"passed\": true}, {\"check\": \"exact node\", \"actual\": 5.0, \"expected\": 5.0, \"passed\": true}, {\"check\": \"forward end of table\", \"actual\": 6.6, \"expected\": 6.6, \"passed\": true}, {\"check\": \"aft end of table\", \"actual\": 2.9, \"expected\": 2.9, \"passed\": true}, {\"check\": \"aft of table\", \"actual\": 2.4, \"expected\": \"ERR_RANGE\", \"passed\": false}, {\"check\": \"forward of table\", \"actual\": 6.6, \"expected\": \"ERR_RANGE\", \"passed\": false}, {\"check\": \"flap setting without table\", \"actual\": \"ERR_FLAPS\", \"expected\": \"ERR_FLAPS\", \"passed\": true}, {\"check\": \"flaps 15 between nodes\", \"actual\": 3.7, \"expected\": 3.7, \"passed\": true}, {\"check\": \"sampled case 1\", \"actual\": 5.7, \"expected\": 5.7, \"passed\": true}, {\"check\": \"sampled case 2\", \"actual\": 6.1, \"expected\": 6.1, \"passed\": true}, {\"check\": \"sampled case 3\", \"actual\": 4.8, \"expected\": 4.8, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.063,"exit_code":0,"observations":[{"actual":5.4,"check":"mid table flaps 5","expected":5.4,"passed":true},{"actual":5.0,"check":"exact node","expected":5.0,"passed":true},{"actual":6.6,"check":"forward end of table","expected":6.6,"passed":true},{"actual":2.9,"check":"aft end of table","expected":2.9,"passed":true},{"actual":"ERR_RANGE","check":"aft of table","expected":"ERR_RANGE","passed":true},{"actual":"ERR_RANGE","check":"forward of table","expected":"ERR_RANGE","passed":true},{"actual":"ERR_FLAPS","check":"flap setting without table","expected":"ERR_FLAPS","passed":true},{"actual":3.7,"check":"flaps 15 between nodes","expected":3.7,"passed":true},{"actual":5.7,"check":"sampled case 1","expected":5.7,"passed":true},{"actual":6.1,"check":"sampled case 2","expected":6.1,"passed":true},{"actual":4.8,"check":"sampled case 3","expected":4.8,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mid table flaps 5\", \"actual\": 5.4, \"expected\": 5.4, \"passed\": true}, {\"check\": \"exact node\", \"actual\": 5.0, \"expected\": 5.0, \"passed\": true}, {\"check\": \"forward end of table\", \"actual\": 6.6, \"expected\": 6.6, \"passed\": true}, {\"check\": \"aft end of table\", \"actual\": 2.9, \"expected\": 2.9, \"passed\": true}, {\"check\": \"aft of table\", \"actual\": \"ERR_RANGE\", \"expected\": \"ERR_RANGE\", \"passed\": true}, {\"check\": \"forward of table\", \"actual\": \"ERR_RANGE\", \"expected\": \"ERR_RANGE\", \"passed\": true}, {\"check\": \"flap setting without table\", \"actual\": \"ERR_FLAPS\", \"expected\": \"ERR_FLAPS\", \"passed\": true}, {\"check\": \"flaps 15 between nodes\", \"actual\": 3.7, \"expected\": 3.7, \"passed\": true}, {\"check\": \"sampled case 1\", \"actual\": 5.7, \"expected\": 5.7, \"passed\": true}, {\"check\": \"sampled case 2\", \"actual\": 6.1, \"expected\": 6.1, \"passed\": true}, {\"check\": \"sampled case 3\", \"actual\": 4.8, \"expected\": 4.8, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}