{"abstract":"A 12.5-pip premium is applied as 12 pips.","category":"Currency rounding and FX conversion","checks":6,"contract":"solve(pair, spot, points, notional): pair is BASEQUOTE. The pip exponent depends on the quote currency: JPY 2, HUF 2, KRW 0, otherwise 4 (pip = 10**-exp). points is a decimal string of pips (fractional pips allowed, negative for discount). forward = spot + points*pip rounded half-even to exp+1 decimals (one fractional pip). The pip value in quote currency is notional*pip rounded half-even to 2 decimals. Return [forward, pip_value] as plain strings.","evaluation_group":"w2-currency_rounding_and_fx_conversion-forward-points-pips","failed_approach":"Rounding points to the nearest whole pip through float still drops the fractional pip.","family":"w2-currency_rounding_and_fx_conversion-forward-points-pips-fractional-points","id":"FA-62086","implementations":{"attempt":{"sha256":"2887162b4a580160a6535aa6c60b0e2c2ff8d7584d813149416d581a4409b018","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN\nN = 1\nobservations = []\ndef solve(pair, spot, points, notional):\n    pip_exp = {'JPY': 2, 'HUF': 2, 'KRW': 0}\n    quote = pair[3:]\n    pe = pip_exp.get(quote, 4)\n    pip = Decimal(1).scaleb(-pe)\n    fwd = Decimal(spot) + Decimal(round(float(points))) * pip\n    fwd = fwd.quantize(Decimal(1).scaleb(-(pe + 1)), rounding=ROUND_HALF_EVEN)\n    pv = (Decimal(notional) * pip).quantize(Decimal('0.01'), rounding=ROUND_HALF_EVEN)\n    return [format(fwd, 'f'), format(pv, 'f')]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression fractional-points 1', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('regression fractional-points 2', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('control: forint', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33'])],\n [('regression fractional-points 1', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('regression fractional-points 2', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00'])],\n [('regression fractional-points 1', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('regression fractional-points 2', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('control: yen discount', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00'])],\n [('regression fractional-points 1', ('EURHUF', '698.3982', '193.71', 1000), ['700.335', '10.00']),\n  ('regression fractional-points 2', ('EURHUF', '138.28482', '-67.66', 1000), ['137.608', '10.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('control: forint', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33'])],\n [('regression fractional-points 1', ('EURHUF', '4938.658', '-58.12', 1000000), ['4938.077', '10000.00']),\n  ('regression fractional-points 2', ('JPYSEK', '183.37113', '-118.52', 1000), ['183.35928', '0.10']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('control: yen discount', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00'])]]\nfor label, args, expected in cases[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":"b61a4af1c324a55b55007f54e4d43a37f49d7cfc373f61023041a10e36309840","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN\nN = 1\nobservations = []\ndef solve(pair, spot, points, notional):\n    pip_exp = {'JPY': 2, 'HUF': 2, 'KRW': 0}\n    quote = pair[3:]\n    pe = pip_exp.get(quote, 4)\n    pip = Decimal(1).scaleb(-pe)\n    fwd = Decimal(spot) + Decimal(int(Decimal(points))) * pip\n    fwd = fwd.quantize(Decimal(1).scaleb(-(pe + 1)), rounding=ROUND_HALF_EVEN)\n    pv = (Decimal(notional) * pip).quantize(Decimal('0.01'), rounding=ROUND_HALF_EVEN)\n    return [format(fwd, 'f'), format(pv, 'f')]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression fractional-points 1', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('regression fractional-points 2', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('control: forint', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33'])],\n [('regression fractional-points 1', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('regression fractional-points 2', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00'])],\n [('regression fractional-points 1', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('regression fractional-points 2', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('control: yen discount', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00'])],\n [('regression fractional-points 1', ('EURHUF', '698.3982', '193.71', 1000), ['700.335', '10.00']),\n  ('regression fractional-points 2', ('EURHUF', '138.28482', '-67.66', 1000), ['137.608', '10.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('control: forint', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33'])],\n [('regression fractional-points 1', ('EURHUF', '4938.658', '-58.12', 1000000), ['4938.077', '10000.00']),\n  ('regression fractional-points 2', ('JPYSEK', '183.37113', '-118.52', 1000), ['183.35928', '0.10']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('control: yen discount', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00'])]]\nfor label, args, expected in cases[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":"db16cca41cb2649a0a33b562451ab4f464d702c6d7d5782bfcae3f240d759bee","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN\nN = 1\nobservations = []\ndef solve(pair, spot, points, notional):\n    pip_exp = {'JPY': 2, 'HUF': 2, 'KRW': 0}\n    quote = pair[3:]\n    pe = pip_exp.get(quote, 4)\n    pip = Decimal(1).scaleb(-pe)\n    fwd = Decimal(spot) + Decimal(points) * pip\n    fwd = fwd.quantize(Decimal(1).scaleb(-(pe + 1)), rounding=ROUND_HALF_EVEN)\n    pv = (Decimal(notional) * pip).quantize(Decimal('0.01'), rounding=ROUND_HALF_EVEN)\n    return [format(fwd, 'f'), format(pv, 'f')]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression fractional-points 1', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('regression fractional-points 2', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('control: forint', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33'])],\n [('regression fractional-points 1', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('regression fractional-points 2', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00'])],\n [('regression fractional-points 1', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('regression fractional-points 2', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('control: yen discount', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00'])],\n [('regression fractional-points 1', ('EURHUF', '698.3982', '193.71', 1000), ['700.335', '10.00']),\n  ('regression fractional-points 2', ('EURHUF', '138.28482', '-67.66', 1000), ['137.608', '10.00']),\n  ('control: won pips', ('USDKRW', '1352.5', '3.2', 1000000), ['1355.7', '1000000.00']),\n  ('control: forint', ('EURHUF', '395.12', '-0.35', 250000), ['395.116', '2500.00']),\n  ('control: yen base pair', ('JPYSEK', '0.07012', '1.5', 5000000), ['0.07027', '500.00']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33'])],\n [('regression fractional-points 1', ('EURHUF', '4938.658', '-58.12', 1000000), ['4938.077', '10000.00']),\n  ('regression fractional-points 2', ('JPYSEK', '183.37113', '-118.52', 1000), ['183.35928', '0.10']),\n  ('control: sterling', ('GBPUSD', '1.26501', '-0.75', 333333), ['1.26494', '33.33']),\n  ('control: zero points', ('AUDNZD', '1.09876', '0', 100000), ['1.09876', '10.00']),\n  ('control: euro premium', ('EURUSD', '1.08345', '12.5', 1000000), ['1.08470', '100.00']),\n  ('control: yen discount', ('USDJPY', '151.234', '-45.25', 1000000), ['150.782', '10000.00'])]]\nfor label, args, expected in cases[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, bounded teaching model with a stipulated toy contract; it makes no claim of conformance to any real regulation, standard, or institution's rules. 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-currency_rounding_and_fx_conversion-forward-points-pips-fractional-points","generated_at":"2026-09-29T14:47:01.342329+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Currency amounts must be rounded at the right stage and in the right unit, or ledgers, quotes and settlements drift by minor units.","repair":"Use the exact decimal points value, including fractional pips.","root_cause":"The points string is truncated through int() before scaling by the pip size.","sha256":"30693d81aa1fdb440df6c995cdad808eb3cd59be99d823e2b30967b4dcaeb430","title":"Fractional forward points are truncated to whole pips · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.102,"exit_code":1,"observations":[{"actual":["1.08465","100.00"],"check":"regression fractional-points 1","expected":["1.08470","100.00"],"passed":false},{"actual":["150.784","10000.00"],"check":"regression fractional-points 2","expected":["150.782","10000.00"],"passed":false},{"actual":["1355.5","1000000.00"],"check":"control: won pips","expected":["1355.7","1000000.00"],"passed":false},{"actual":["395.120","2500.00"],"check":"control: forint","expected":["395.116","2500.00"],"passed":false},{"actual":["0.07032","500.00"],"check":"control: yen base pair","expected":["0.07027","500.00"],"passed":false},{"actual":["1.26491","33.33"],"check":"control: sterling","expected":["1.26494","33.33"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression fractional-points 1\", \"actual\": [\"1.08465\", \"100.00\"], \"expected\": [\"1.08470\", \"100.00\"], \"passed\": false}, {\"check\": \"regression fractional-points 2\", \"actual\": [\"150.784\", \"10000.00\"], \"expected\": [\"150.782\", \"10000.00\"], \"passed\": false}, {\"check\": \"control: won pips\", \"actual\": [\"1355.5\", \"1000000.00\"], \"expected\": [\"1355.7\", \"1000000.00\"], \"passed\": false}, {\"check\": \"control: forint\", \"actual\": [\"395.120\", \"2500.00\"], \"expected\": [\"395.116\", \"2500.00\"], \"passed\": false}, {\"check\": \"control: yen base pair\", \"actual\": [\"0.07032\", \"500.00\"], \"expected\": [\"0.07027\", \"500.00\"], \"passed\": false}, {\"check\": \"control: sterling\", \"actual\": [\"1.26491\", \"33.33\"], \"expected\": [\"1.26494\", \"33.33\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.51,"exit_code":1,"observations":[{"actual":["1.08465","100.00"],"check":"regression fractional-points 1","expected":["1.08470","100.00"],"passed":false},{"actual":["150.784","10000.00"],"check":"regression fractional-points 2","expected":["150.782","10000.00"],"passed":false},{"actual":["1355.5","1000000.00"],"check":"control: won pips","expected":["1355.7","1000000.00"],"passed":false},{"actual":["395.120","2500.00"],"check":"control: forint","expected":["395.116","2500.00"],"passed":false},{"actual":["0.07022","500.00"],"check":"control: yen base pair","expected":["0.07027","500.00"],"passed":false},{"actual":["1.26501","33.33"],"check":"control: sterling","expected":["1.26494","33.33"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression fractional-points 1\", \"actual\": [\"1.08465\", \"100.00\"], \"expected\": [\"1.08470\", \"100.00\"], \"passed\": false}, {\"check\": \"regression fractional-points 2\", \"actual\": [\"150.784\", \"10000.00\"], \"expected\": [\"150.782\", \"10000.00\"], \"passed\": false}, {\"check\": \"control: won pips\", \"actual\": [\"1355.5\", \"1000000.00\"], \"expected\": [\"1355.7\", \"1000000.00\"], \"passed\": false}, {\"check\": \"control: forint\", \"actual\": [\"395.120\", \"2500.00\"], \"expected\": [\"395.116\", \"2500.00\"], \"passed\": false}, {\"check\": \"control: yen base pair\", \"actual\": [\"0.07022\", \"500.00\"], \"expected\": [\"0.07027\", \"500.00\"], \"passed\": false}, {\"check\": \"control: sterling\", \"actual\": [\"1.26501\", \"33.33\"], \"expected\": [\"1.26494\", \"33.33\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.614,"exit_code":0,"observations":[{"actual":["1.08470","100.00"],"check":"regression fractional-points 1","expected":["1.08470","100.00"],"passed":true},{"actual":["150.782","10000.00"],"check":"regression fractional-points 2","expected":["150.782","10000.00"],"passed":true},{"actual":["1355.7","1000000.00"],"check":"control: won pips","expected":["1355.7","1000000.00"],"passed":true},{"actual":["395.116","2500.00"],"check":"control: forint","expected":["395.116","2500.00"],"passed":true},{"actual":["0.07027","500.00"],"check":"control: yen base pair","expected":["0.07027","500.00"],"passed":true},{"actual":["1.26494","33.33"],"check":"control: sterling","expected":["1.26494","33.33"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression fractional-points 1\", \"actual\": [\"1.08470\", \"100.00\"], \"expected\": [\"1.08470\", \"100.00\"], \"passed\": true}, {\"check\": \"regression fractional-points 2\", \"actual\": [\"150.782\", \"10000.00\"], \"expected\": [\"150.782\", \"10000.00\"], \"passed\": true}, {\"check\": \"control: won pips\", \"actual\": [\"1355.7\", \"1000000.00\"], \"expected\": [\"1355.7\", \"1000000.00\"], \"passed\": true}, {\"check\": \"control: forint\", \"actual\": [\"395.116\", \"2500.00\"], \"expected\": [\"395.116\", \"2500.00\"], \"passed\": true}, {\"check\": \"control: yen base pair\", \"actual\": [\"0.07027\", \"500.00\"], \"expected\": [\"0.07027\", \"500.00\"], \"passed\": true}, {\"check\": \"control: sterling\", \"actual\": [\"1.26494\", \"33.33\"], \"expected\": [\"1.26494\", \"33.33\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}