{"abstract":"A 100.00 NUC fare at ROE 1.1 is collected as 111 instead of 110.","category":"Airline fare rule evaluation","checks":10,"contract":"Input {'nuc':[component amounts],'roe','currency'}. Sum components exactly, truncate the NUC total to 2 decimals, multiply by ROE, and round UP to the currency unit (USD/EUR/GBP 1, JPY 100, KWD 0.1) in exact decimal arithmetic; other currencies -> 'ERR_CURRENCY'. Return [NUC string, local string].","evaluation_group":"w2-airline-fare-rules-nuc-roe-conversion","failed_approach":"Adding one half and rounding bumps exact amounts to the next unit.","family":"w2-airline-fare-rules-nuc-roe-conversion-float-unit-ceiling","id":"FA-66576","implementations":{"attempt":{"sha256":"23426499f7dafb4416883b5559d2236ef4f60e7091045d7d9df67426466d8dca","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport decimal\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    units = {'USD': '1', 'EUR': '1', 'JPY': '100', 'KWD': '0.1', 'GBP': '1'}\n    cur = x['currency']\n    if cur not in units: return 'ERR_CURRENCY'\n    nuc = sum(decimal.Decimal(str(c)) for c in x['nuc'])\n    nuc = nuc.quantize(decimal.Decimal('0.01'), rounding=decimal.ROUND_DOWN)\n    local = nuc * decimal.Decimal(str(x['roe']))\n    u = decimal.Decimal(units[cur])\n    local = decimal.Decimal(round(float(nuc) * x['roe'] / float(u) + 0.5)) * u\n    return [str(nuc), str(local)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['USD two components', {'nuc': [412.357, 388.25], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.336, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [100.0], 'roe': 1.1, 'currency': 'USD'}, ['100.00', '110']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [803.18, 217.556], 'roe': 82.0232, 'currency': 'EUR'}, ['1020.73', '83724']], ['sampled case 2', {'nuc': [103.64], 'roe': 139.908192, 'currency': 'JPY'}, ['103.64', '14600']], ['sampled case 3', {'nuc': [310.5398, 792.913, 638.67], 'roe': 101.8, 'currency': 'EUR'}, ['1742.12', '177348']]], [['USD two components', {'nuc': [412.357, 388.25100000000003], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.33700000000002, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [200.0], 'roe': 1.1, 'currency': 'USD'}, ['200.00', '220']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [563.46, 751.68, 255.98, 518.496], 'roe': 85.8739, 'currency': 'KWD'}, ['2089.61', '179443.0']], ['sampled case 2', {'nuc': [209.16, 92.65, 665.5938], 'roe': 70.378988, 'currency': 'KWD'}, ['967.40', '68084.7']], ['sampled case 3', {'nuc': [239.23, 415.82, 554.5256, 886.394], 'roe': 150.32, 'currency': 'GBP'}, ['2095.96', '315065']]], [['USD two components', {'nuc': [412.357, 388.252], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.338, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [400.0], 'roe': 1.1, 'currency': 'USD'}, ['400.00', '440']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [522.92, 637.956, 224.95, 711.2788], 'roe': 128.068436, 'currency': 'KWD'}, ['2097.10', '268572.4']], ['sampled case 2', {'nuc': [144.652, 317.07, 333.8817, 156.6471], 'roe': 11.54, 'currency': 'EUR'}, ['952.25', '10989']], ['sampled case 3', {'nuc': [727.197], 'roe': 115.954461, 'currency': 'EUR'}, ['727.19', '84321']]], [['USD two components', {'nuc': [412.357, 388.25300000000004], 'roe': 1.0, 'currency': 'USD'}, ['800.61', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.339, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [700.0], 'roe': 1.1, 'currency': 'USD'}, ['700.00', '770']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [367.07, 59.422, 404.75, 654.184], 'roe': 8.8773, 'currency': 'KWD'}, ['1485.42', '13186.6']], ['sampled case 2', {'nuc': [244.923, 449.2429, 688.15, 857.76], 'roe': 23.061535, 'currency': 'JPY'}, ['2240.07', '51700']], ['sampled case 3', {'nuc': [354.514, 161.36], 'roe': 58.707806, 'currency': 'KWD'}, ['515.87', '30285.6']]], [['USD two components', {'nuc': [412.357, 388.254], 'roe': 1.0, 'currency': 'USD'}, ['800.61', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.34, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [800.0], 'roe': 1.1, 'currency': 'USD'}, ['800.00', '880']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [58.672], 'roe': 29.040403, 'currency': 'USD'}, ['58.67', '1704']], ['sampled case 2', {'nuc': [303.792, 254.01, 298.5418], 'roe': 12.68, 'currency': 'GBP'}, ['856.34', '10859']], ['sampled case 3', {'nuc': [709.048], 'roe': 90.68, 'currency': 'EUR'}, ['709.04', '64296']]]]\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":"01fe37208f37764c33f97cbc032fc891f938cd192c8b2cc8cc5787559ef4336c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport decimal\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    units = {'USD': '1', 'EUR': '1', 'JPY': '100', 'KWD': '0.1', 'GBP': '1'}\n    cur = x['currency']\n    if cur not in units: return 'ERR_CURRENCY'\n    nuc = sum(decimal.Decimal(str(c)) for c in x['nuc'])\n    nuc = nuc.quantize(decimal.Decimal('0.01'), rounding=decimal.ROUND_DOWN)\n    local = nuc * decimal.Decimal(str(x['roe']))\n    u = decimal.Decimal(units[cur])\n    local = decimal.Decimal(math.ceil(float(nuc) * x['roe'] / float(u))) * u\n    return [str(nuc), str(local)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['USD two components', {'nuc': [412.357, 388.25], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.336, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [100.0], 'roe': 1.1, 'currency': 'USD'}, ['100.00', '110']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [803.18, 217.556], 'roe': 82.0232, 'currency': 'EUR'}, ['1020.73', '83724']], ['sampled case 2', {'nuc': [103.64], 'roe': 139.908192, 'currency': 'JPY'}, ['103.64', '14600']], ['sampled case 3', {'nuc': [310.5398, 792.913, 638.67], 'roe': 101.8, 'currency': 'EUR'}, ['1742.12', '177348']]], [['USD two components', {'nuc': [412.357, 388.25100000000003], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.33700000000002, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [200.0], 'roe': 1.1, 'currency': 'USD'}, ['200.00', '220']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [563.46, 751.68, 255.98, 518.496], 'roe': 85.8739, 'currency': 'KWD'}, ['2089.61', '179443.0']], ['sampled case 2', {'nuc': [209.16, 92.65, 665.5938], 'roe': 70.378988, 'currency': 'KWD'}, ['967.40', '68084.7']], ['sampled case 3', {'nuc': [239.23, 415.82, 554.5256, 886.394], 'roe': 150.32, 'currency': 'GBP'}, ['2095.96', '315065']]], [['USD two components', {'nuc': [412.357, 388.252], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.338, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [400.0], 'roe': 1.1, 'currency': 'USD'}, ['400.00', '440']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [522.92, 637.956, 224.95, 711.2788], 'roe': 128.068436, 'currency': 'KWD'}, ['2097.10', '268572.4']], ['sampled case 2', {'nuc': [144.652, 317.07, 333.8817, 156.6471], 'roe': 11.54, 'currency': 'EUR'}, ['952.25', '10989']], ['sampled case 3', {'nuc': [727.197], 'roe': 115.954461, 'currency': 'EUR'}, ['727.19', '84321']]], [['USD two components', {'nuc': [412.357, 388.25300000000004], 'roe': 1.0, 'currency': 'USD'}, ['800.61', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.339, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [700.0], 'roe': 1.1, 'currency': 'USD'}, ['700.00', '770']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [367.07, 59.422, 404.75, 654.184], 'roe': 8.8773, 'currency': 'KWD'}, ['1485.42', '13186.6']], ['sampled case 2', {'nuc': [244.923, 449.2429, 688.15, 857.76], 'roe': 23.061535, 'currency': 'JPY'}, ['2240.07', '51700']], ['sampled case 3', {'nuc': [354.514, 161.36], 'roe': 58.707806, 'currency': 'KWD'}, ['515.87', '30285.6']]], [['USD two components', {'nuc': [412.357, 388.254], 'roe': 1.0, 'currency': 'USD'}, ['800.61', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.34, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [800.0], 'roe': 1.1, 'currency': 'USD'}, ['800.00', '880']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [58.672], 'roe': 29.040403, 'currency': 'USD'}, ['58.67', '1704']], ['sampled case 2', {'nuc': [303.792, 254.01, 298.5418], 'roe': 12.68, 'currency': 'GBP'}, ['856.34', '10859']], ['sampled case 3', {'nuc': [709.048], 'roe': 90.68, 'currency': 'EUR'}, ['709.04', '64296']]]]\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":"688f3e202dbe14ba73ade80fadc4a6ec195a78c2c066541b07ee0d8b76750374","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport decimal\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    units = {'USD': '1', 'EUR': '1', 'JPY': '100', 'KWD': '0.1', 'GBP': '1'}\n    cur = x['currency']\n    if cur not in units: return 'ERR_CURRENCY'\n    nuc = sum(decimal.Decimal(str(c)) for c in x['nuc'])\n    nuc = nuc.quantize(decimal.Decimal('0.01'), rounding=decimal.ROUND_DOWN)\n    local = nuc * decimal.Decimal(str(x['roe']))\n    u = decimal.Decimal(units[cur])\n    local = (local / u).to_integral_value(rounding=decimal.ROUND_CEILING) * u\n    return [str(nuc), str(local)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['USD two components', {'nuc': [412.357, 388.25], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.336, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [100.0], 'roe': 1.1, 'currency': 'USD'}, ['100.00', '110']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [803.18, 217.556], 'roe': 82.0232, 'currency': 'EUR'}, ['1020.73', '83724']], ['sampled case 2', {'nuc': [103.64], 'roe': 139.908192, 'currency': 'JPY'}, ['103.64', '14600']], ['sampled case 3', {'nuc': [310.5398, 792.913, 638.67], 'roe': 101.8, 'currency': 'EUR'}, ['1742.12', '177348']]], [['USD two components', {'nuc': [412.357, 388.25100000000003], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.33700000000002, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [200.0], 'roe': 1.1, 'currency': 'USD'}, ['200.00', '220']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [563.46, 751.68, 255.98, 518.496], 'roe': 85.8739, 'currency': 'KWD'}, ['2089.61', '179443.0']], ['sampled case 2', {'nuc': [209.16, 92.65, 665.5938], 'roe': 70.378988, 'currency': 'KWD'}, ['967.40', '68084.7']], ['sampled case 3', {'nuc': [239.23, 415.82, 554.5256, 886.394], 'roe': 150.32, 'currency': 'GBP'}, ['2095.96', '315065']]], [['USD two components', {'nuc': [412.357, 388.252], 'roe': 1.0, 'currency': 'USD'}, ['800.60', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.338, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [400.0], 'roe': 1.1, 'currency': 'USD'}, ['400.00', '440']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [522.92, 637.956, 224.95, 711.2788], 'roe': 128.068436, 'currency': 'KWD'}, ['2097.10', '268572.4']], ['sampled case 2', {'nuc': [144.652, 317.07, 333.8817, 156.6471], 'roe': 11.54, 'currency': 'EUR'}, ['952.25', '10989']], ['sampled case 3', {'nuc': [727.197], 'roe': 115.954461, 'currency': 'EUR'}, ['727.19', '84321']]], [['USD two components', {'nuc': [412.357, 388.25300000000004], 'roe': 1.0, 'currency': 'USD'}, ['800.61', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.339, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [700.0], 'roe': 1.1, 'currency': 'USD'}, ['700.00', '770']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [367.07, 59.422, 404.75, 654.184], 'roe': 8.8773, 'currency': 'KWD'}, ['1485.42', '13186.6']], ['sampled case 2', {'nuc': [244.923, 449.2429, 688.15, 857.76], 'roe': 23.061535, 'currency': 'JPY'}, ['2240.07', '51700']], ['sampled case 3', {'nuc': [354.514, 161.36], 'roe': 58.707806, 'currency': 'KWD'}, ['515.87', '30285.6']]], [['USD two components', {'nuc': [412.357, 388.254], 'roe': 1.0, 'currency': 'USD'}, ['800.61', '801']], ['JPY hundreds', {'nuc': [512.12, 97.555], 'roe': 148.34, 'currency': 'JPY'}, ['609.67', '90500']], ['KWD tenths', {'nuc': [700.009, 100.0], 'roe': 0.30712, 'currency': 'KWD'}, ['800.00', '245.7']], ['exact local amount', {'nuc': [250.0, 250.0], 'roe': 0.92, 'currency': 'EUR'}, ['500.00', '460']], ['float product trap', {'nuc': [800.0], 'roe': 1.1, 'currency': 'USD'}, ['800.00', '880']], ['unsupported currency', {'nuc': [100.0], 'roe': 3.67, 'currency': 'AED'}, 'ERR_CURRENCY'], ['sum crosses a cent', {'nuc': [100.005, 200.006], 'roe': 0.788341, 'currency': 'GBP'}, ['300.01', '237']], ['sampled case 1', {'nuc': [58.672], 'roe': 29.040403, 'currency': 'USD'}, ['58.67', '1704']], ['sampled case 2', {'nuc': [303.792, 254.01, 298.5418], 'roe': 12.68, 'currency': 'GBP'}, ['856.34', '10859']], ['sampled case 3', {'nuc': [709.048], 'roe': 90.68, 'currency': 'EUR'}, ['709.04', '64296']]]]\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 stipulated toy fare-rule contract with invented constants; it is not an ATPCO or carrier tariff implementation and makes no claim of industry-standard 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-airline-fare-rules-nuc-roe-conversion-float-unit-ceiling","generated_at":"2026-09-29T14:47:44.968948+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Fare construction sums neutral units, converts with a rate of exchange, and rounds to currency-specific units in a prescribed direction.","repair":"Round up in exact decimal arithmetic.","root_cause":"The conversion multiplies in binary floats, so 100.0 * 1.1 = 110.00000000000001 and the ceiling adds a whole unit.","sha256":"fb0d7fb0d12b22dfdbd70431d5e1ed58e9d441e7b142a00f546bdb2945c638d4","title":"Unit ceiling computed in binary floating point · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.207,"exit_code":1,"observations":[{"actual":["800.60","801"],"check":"USD two components","expected":["800.60","801"],"passed":true},{"actual":["609.67","90500"],"check":"JPY hundreds","expected":["609.67","90500"],"passed":true},{"actual":["800.00","245.7"],"check":"KWD tenths","expected":["800.00","245.7"],"passed":true},{"actual":["500.00","460"],"check":"exact local amount","expected":["500.00","460"],"passed":true},{"actual":["100.00","111"],"check":"float product trap","expected":["100.00","110"],"passed":false},{"actual":"ERR_CURRENCY","check":"unsupported currency","expected":"ERR_CURRENCY","passed":true},{"actual":["300.01","237"],"check":"sum crosses a cent","expected":["300.01","237"],"passed":true},{"actual":["1020.73","83724"],"check":"sampled case 1","expected":["1020.73","83724"],"passed":true},{"actual":["103.64","14600"],"check":"sampled case 2","expected":["103.64","14600"],"passed":true},{"actual":["1742.12","177348"],"check":"sampled case 3","expected":["1742.12","177348"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"USD two components\", \"actual\": [\"800.60\", \"801\"], \"expected\": [\"800.60\", \"801\"], \"passed\": true}, {\"check\": \"JPY hundreds\", \"actual\": [\"609.67\", \"90500\"], \"expected\": [\"609.67\", \"90500\"], \"passed\": true}, {\"check\": \"KWD tenths\", \"actual\": [\"800.00\", \"245.7\"], \"expected\": [\"800.00\", \"245.7\"], \"passed\": true}, {\"check\": \"exact local amount\", \"actual\": [\"500.00\", \"460\"], \"expected\": [\"500.00\", \"460\"], \"passed\": true}, {\"check\": \"float product trap\", \"actual\": [\"100.00\", \"111\"], \"expected\": [\"100.00\", \"110\"], \"passed\": false}, {\"check\": \"unsupported currency\", \"actual\": \"ERR_CURRENCY\", \"expected\": \"ERR_CURRENCY\", \"passed\": true}, {\"check\": \"sum crosses a cent\", \"actual\": [\"300.01\", \"237\"], \"expected\": [\"300.01\", \"237\"], \"passed\": true}, {\"check\": \"sampled case 1\", \"actual\": [\"1020.73\", \"83724\"], \"expected\": [\"1020.73\", \"83724\"], \"passed\": true}, {\"check\": \"sampled case 2\", \"actual\": [\"103.64\", \"14600\"], \"expected\": [\"103.64\", \"14600\"], \"passed\": true}, {\"check\": \"sampled case 3\", \"actual\": [\"1742.12\", \"177348\"], \"expected\": [\"1742.12\", \"177348\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.34,"exit_code":1,"observations":[{"actual":["800.60","801"],"check":"USD two components","expected":["800.60","801"],"passed":true},{"actual":["609.67","90500"],"check":"JPY hundreds","expected":["609.67","90500"],"passed":true},{"actual":["800.00","245.7"],"check":"KWD tenths","expected":["800.00","245.7"],"passed":true},{"actual":["500.00","460"],"check":"exact local amount","expected":["500.00","460"],"passed":true},{"actual":["100.00","111"],"check":"float product trap","expected":["100.00","110"],"passed":false},{"actual":"ERR_CURRENCY","check":"unsupported currency","expected":"ERR_CURRENCY","passed":true},{"actual":["300.01","237"],"check":"sum crosses a cent","expected":["300.01","237"],"passed":true},{"actual":["1020.73","83724"],"check":"sampled case 1","expected":["1020.73","83724"],"passed":true},{"actual":["103.64","14600"],"check":"sampled case 2","expected":["103.64","14600"],"passed":true},{"actual":["1742.12","177348"],"check":"sampled case 3","expected":["1742.12","177348"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"USD two components\", \"actual\": [\"800.60\", \"801\"], \"expected\": [\"800.60\", \"801\"], \"passed\": true}, {\"check\": \"JPY hundreds\", \"actual\": [\"609.67\", \"90500\"], \"expected\": [\"609.67\", \"90500\"], \"passed\": true}, {\"check\": \"KWD tenths\", \"actual\": [\"800.00\", \"245.7\"], \"expected\": [\"800.00\", \"245.7\"], \"passed\": true}, {\"check\": \"exact local amount\", \"actual\": [\"500.00\", \"460\"], \"expected\": [\"500.00\", \"460\"], \"passed\": true}, {\"check\": \"float product trap\", \"actual\": [\"100.00\", \"111\"], \"expected\": [\"100.00\", \"110\"], \"passed\": false}, {\"check\": \"unsupported currency\", \"actual\": \"ERR_CURRENCY\", \"expected\": \"ERR_CURRENCY\", \"passed\": true}, {\"check\": \"sum crosses a cent\", \"actual\": [\"300.01\", \"237\"], \"expected\": [\"300.01\", \"237\"], \"passed\": true}, {\"check\": \"sampled case 1\", \"actual\": [\"1020.73\", \"83724\"], \"expected\": [\"1020.73\", \"83724\"], \"passed\": true}, {\"check\": \"sampled case 2\", \"actual\": [\"103.64\", \"14600\"], \"expected\": [\"103.64\", \"14600\"], \"passed\": true}, {\"check\": \"sampled case 3\", \"actual\": [\"1742.12\", \"177348\"], \"expected\": [\"1742.12\", \"177348\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.482,"exit_code":0,"observations":[{"actual":["800.60","801"],"check":"USD two components","expected":["800.60","801"],"passed":true},{"actual":["609.67","90500"],"check":"JPY hundreds","expected":["609.67","90500"],"passed":true},{"actual":["800.00","245.7"],"check":"KWD tenths","expected":["800.00","245.7"],"passed":true},{"actual":["500.00","460"],"check":"exact local amount","expected":["500.00","460"],"passed":true},{"actual":["100.00","110"],"check":"float product trap","expected":["100.00","110"],"passed":true},{"actual":"ERR_CURRENCY","check":"unsupported currency","expected":"ERR_CURRENCY","passed":true},{"actual":["300.01","237"],"check":"sum crosses a cent","expected":["300.01","237"],"passed":true},{"actual":["1020.73","83724"],"check":"sampled case 1","expected":["1020.73","83724"],"passed":true},{"actual":["103.64","14600"],"check":"sampled case 2","expected":["103.64","14600"],"passed":true},{"actual":["1742.12","177348"],"check":"sampled case 3","expected":["1742.12","177348"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"USD two components\", \"actual\": [\"800.60\", \"801\"], \"expected\": [\"800.60\", \"801\"], \"passed\": true}, {\"check\": \"JPY hundreds\", \"actual\": [\"609.67\", \"90500\"], \"expected\": [\"609.67\", \"90500\"], \"passed\": true}, {\"check\": \"KWD tenths\", \"actual\": [\"800.00\", \"245.7\"], \"expected\": [\"800.00\", \"245.7\"], \"passed\": true}, {\"check\": \"exact local amount\", \"actual\": [\"500.00\", \"460\"], \"expected\": [\"500.00\", \"460\"], \"passed\": true}, {\"check\": \"float product trap\", \"actual\": [\"100.00\", \"110\"], \"expected\": [\"100.00\", \"110\"], \"passed\": true}, {\"check\": \"unsupported currency\", \"actual\": \"ERR_CURRENCY\", \"expected\": \"ERR_CURRENCY\", \"passed\": true}, {\"check\": \"sum crosses a cent\", \"actual\": [\"300.01\", \"237\"], \"expected\": [\"300.01\", \"237\"], \"passed\": true}, {\"check\": \"sampled case 1\", \"actual\": [\"1020.73\", \"83724\"], \"expected\": [\"1020.73\", \"83724\"], \"passed\": true}, {\"check\": \"sampled case 2\", \"actual\": [\"103.64\", \"14600\"], \"expected\": [\"103.64\", \"14600\"], \"passed\": true}, {\"check\": \"sampled case 3\", \"actual\": [\"1742.12\", \"177348\"], \"expected\": [\"1742.12\", \"177348\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}