{"abstract":"A CG exactly at the forward or aft table limit returns ERR_RANGE.","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":"Dropping the aft bound lets values beyond the table fall through and return no trim at all.","family":"w2-aviation-weight-balance-stab-trim-lookup-trim-range-exclusive","id":"FA-66146","implementations":{"attempt":{"sha256":"00f447771f943be0436b9779776de9a4f163c1998e8c79c598b25594a331ab38","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]: 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"},"broken":{"sha256":"bf93c0edb857224e222cccaba06a563e3ad1bd904d78b9b1111c78e76ddce066","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"},"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-range-exclusive","generated_at":"2026-09-29T14:47:40.460092+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":"Accept %MAC values equal to the table end points.","root_cause":"The range check excludes the first and last table nodes.","sha256":"acc9652606d6813351e5936dfa6ef45a7f08bb3480228113add4892ef00e74ae","title":"Table end points rejected as out of range · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.69,"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":null,"check":"aft of table","expected":"ERR_RANGE","passed":false},{"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":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\": null, \"expected\": \"ERR_RANGE\", \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":43.612,"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":"ERR_RANGE","check":"forward end of table","expected":6.6,"passed":false},{"actual":"ERR_RANGE","check":"aft end of table","expected":2.9,"passed":false},{"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":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\": \"ERR_RANGE\", \"expected\": 6.6, \"passed\": false}, {\"check\": \"aft end of table\", \"actual\": \"ERR_RANGE\", \"expected\": 2.9, \"passed\": false}, {\"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\": false}\n"},"fixed":{"elapsed_ms":41.481,"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"}