{"abstract":"Yen amounts render as '¥1,234,567.0'.","category":"Currency rounding and FX conversion","checks":6,"contract":"solve(minor, ccy): format integer minor units. Styles: USD '$' prefix, ',' groups, '.' decimal, 2 digits; EUR ' €' suffix, '.' groups, ',' decimal, 2; JPY '¥' prefix, ',' groups, 0 digits (no decimal separator); CHF 'CHF ' prefix, \"'\" groups, '.', 2; KWD 'KD ' prefix, ',', '.', 3. Group the whole part in threes from the right; the fraction is zero-padded to the exponent. A negative amount places '-' before everything. Unknown codes return 'ERR:currency'.","contract_signature":"minor, ccy","evaluation_group":"w2-currency_rounding_and_fx_conversion-currency-display-format","failed_approach":"Dropping only the separator still appends the zero remainder as an extra digit.","family":"w2-currency_rounding_and_fx_conversion-currency-display-format-zero-exponent-separator","id":"FA-62151","implementations":{"attempt":{"sha256":"a5a08fcd4d2e694183a74ecb167a001ad7d6f82a482fa860458e48b4da69bfae","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(minor, ccy):\n    spec = {'USD': ('$', '', ',', '.', 2), 'EUR': ('', ' €', '.', ',', 2), 'JPY': ('¥', '', ',', '.', 0), 'CHF': ('CHF ', '', \"'\", '.', 2), 'KWD': ('KD ', '', ',', '.', 3)}\n    if ccy not in spec: return 'ERR:currency'\n    pre, suf, grp, dec, e = spec[ccy]\n    neg = minor < 0\n    major, frac = divmod(abs(minor), 10 ** e)\n    digits = str(major)\n    groups = []\n    while len(digits) > 3:\n        groups.insert(0, digits[-3:])\n        digits = digits[:-3]\n    groups.insert(0, digits)\n    body = grp.join(groups)\n    body += (dec if e else '') + str(frac).zfill(e)\n    return ('-' if neg else '') + pre + body + suf\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression zero-exponent-separator 1', (1234567, 'JPY'), '¥1,234,567'),\n  ('regression zero-exponent-separator 2', (0, 'JPY'), '¥0'), ('control: dollars', (123450, 'USD'), '$1,234.50'),\n  ('control: negative dollars', (-150, 'USD'), '-$1.50'), ('control: negative euro cents', (-50, 'EUR'), '-0,50 €'),\n  ('control: franc', (12345678, 'CHF'), \"CHF 123'456.78\")],\n [('regression zero-exponent-separator 1', (-1000, 'JPY'), '-¥1,000'),\n  ('regression zero-exponent-separator 2', (99999, 'JPY'), '¥99,999'), ('control: yen', (1234567, 'JPY'), '¥1,234,567'),\n  ('control: franc', (12345678, 'CHF'), \"CHF 123'456.78\"), ('control: dinar', (1005, 'KWD'), 'KD 1.005'),\n  ('control: unknown', (5, 'GBP'), 'ERR:currency')],\n [('regression zero-exponent-separator 1', (5, 'JPY'), '¥5'),\n  ('regression zero-exponent-separator 2', (100000, 'JPY'), '¥100,000'),\n  ('control: unknown', (5, 'GBP'), 'ERR:currency'), ('control: million euros', (100000000, 'EUR'), '1.000.000,00 €'),\n  ('control: zero yen', (0, 'JPY'), '¥0'), ('control: small dollars', (105, 'USD'), '$1.05')],\n [('regression zero-exponent-separator 1', (-999, 'JPY'), '-¥999'),\n  ('regression zero-exponent-separator 2', (-105, 'JPY'), '-¥105'), ('control: small dollars', (105, 'USD'), '$1.05'),\n  ('control: negative yen', (-1000, 'JPY'), '-¥1,000'), ('control: dollars', (123450, 'USD'), '$1,234.50'),\n  ('control: negative dollars', (-150, 'USD'), '-$1.50')],\n [('regression zero-exponent-separator 1', (123456, 'JPY'), '¥123,456'),\n  ('regression zero-exponent-separator 2', (987654321, 'JPY'), '¥987,654,321'),\n  ('control: negative dollars', (-150, 'USD'), '-$1.50'), ('control: negative euro cents', (-50, 'EUR'), '-0,50 €'),\n  ('control: yen', (1234567, 'JPY'), '¥1,234,567'), ('control: franc', (12345678, 'CHF'), \"CHF 123'456.78\")]]\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":"123ada3e2951f3ec0233ef23bd75664b43183a4fb011181378b3e2f8064dee18","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(minor, ccy):\n    spec = {'USD': ('$', '', ',', '.', 2), 'EUR': ('', ' €', '.', ',', 2), 'JPY': ('¥', '', ',', '.', 0), 'CHF': ('CHF ', '', \"'\", '.', 2), 'KWD': ('KD ', '', ',', '.', 3)}\n    if ccy not in spec: return 'ERR:currency'\n    pre, suf, grp, dec, e = spec[ccy]\n    neg = minor < 0\n    major, frac = divmod(abs(minor), 10 ** e)\n    digits = str(major)\n    groups = []\n    while len(digits) > 3:\n        groups.insert(0, digits[-3:])\n        digits = digits[:-3]\n    groups.insert(0, digits)\n    body = grp.join(groups)\n    body += dec + str(frac).zfill(e)\n    return ('-' if neg else '') + pre + body + suf\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression zero-exponent-separator 1', (1234567, 'JPY'), '¥1,234,567'),\n  ('regression zero-exponent-separator 2', (0, 'JPY'), '¥0'), ('control: dollars', (123450, 'USD'), '$1,234.50'),\n  ('control: negative dollars', (-150, 'USD'), '-$1.50'), ('control: negative euro cents', (-50, 'EUR'), '-0,50 €'),\n  ('control: franc', (12345678, 'CHF'), \"CHF 123'456.78\")],\n [('regression zero-exponent-separator 1', (-1000, 'JPY'), '-¥1,000'),\n  ('regression zero-exponent-separator 2', (99999, 'JPY'), '¥99,999'), ('control: yen', (1234567, 'JPY'), '¥1,234,567'),\n  ('control: franc', (12345678, 'CHF'), \"CHF 123'456.78\"), ('control: dinar', (1005, 'KWD'), 'KD 1.005'),\n  ('control: unknown', (5, 'GBP'), 'ERR:currency')],\n [('regression zero-exponent-separator 1', (5, 'JPY'), '¥5'),\n  ('regression zero-exponent-separator 2', (100000, 'JPY'), '¥100,000'),\n  ('control: unknown', (5, 'GBP'), 'ERR:currency'), ('control: million euros', (100000000, 'EUR'), '1.000.000,00 €'),\n  ('control: zero yen', (0, 'JPY'), '¥0'), ('control: small dollars', (105, 'USD'), '$1.05')],\n [('regression zero-exponent-separator 1', (-999, 'JPY'), '-¥999'),\n  ('regression zero-exponent-separator 2', (-105, 'JPY'), '-¥105'), ('control: small dollars', (105, 'USD'), '$1.05'),\n  ('control: negative yen', (-1000, 'JPY'), '-¥1,000'), ('control: dollars', (123450, 'USD'), '$1,234.50'),\n  ('control: negative dollars', (-150, 'USD'), '-$1.50')],\n [('regression zero-exponent-separator 1', (123456, 'JPY'), '¥123,456'),\n  ('regression zero-exponent-separator 2', (987654321, 'JPY'), '¥987,654,321'),\n  ('control: negative dollars', (-150, 'USD'), '-$1.50'), ('control: negative euro cents', (-50, 'EUR'), '-0,50 €'),\n  ('control: yen', (1234567, 'JPY'), '¥1,234,567'), ('control: franc', (12345678, 'CHF'), \"CHF 123'456.78\")]]\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-currency-display-format-zero-exponent-separator","generated_at":"2026-09-29T14:47:02.001999+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.","root_cause":"The fraction is appended unconditionally even when the exponent is zero.","sha256":"bbf0cdddea62c07528739869372a796d5d36afd75069a139c23d8bc1ef27b5f8","title":"A zero-decimal currency is printed with a decimal separator · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.778,"exit_code":1,"observations":[{"actual":"¥1,234,5670","check":"regression zero-exponent-separator 1","expected":"¥1,234,567","passed":false},{"actual":"¥00","check":"regression zero-exponent-separator 2","expected":"¥0","passed":false},{"actual":"$1,234.50","check":"control: dollars","expected":"$1,234.50","passed":true},{"actual":"-$1.50","check":"control: negative dollars","expected":"-$1.50","passed":true},{"actual":"-0,50 €","check":"control: negative euro cents","expected":"-0,50 €","passed":true},{"actual":"CHF 123'456.78","check":"control: franc","expected":"CHF 123'456.78","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression zero-exponent-separator 1\", \"actual\": \"¥1,234,5670\", \"expected\": \"¥1,234,567\", \"passed\": false}, {\"check\": \"regression zero-exponent-separator 2\", \"actual\": \"¥00\", \"expected\": \"¥0\", \"passed\": false}, {\"check\": \"control: dollars\", \"actual\": \"$1,234.50\", \"expected\": \"$1,234.50\", \"passed\": true}, {\"check\": \"control: negative dollars\", \"actual\": \"-$1.50\", \"expected\": \"-$1.50\", \"passed\": true}, {\"check\": \"control: negative euro cents\", \"actual\": \"-0,50 €\", \"expected\": \"-0,50 €\", \"passed\": true}, {\"check\": \"control: franc\", \"actual\": \"CHF 123'456.78\", \"expected\": \"CHF 123'456.78\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.511,"exit_code":1,"observations":[{"actual":"¥1,234,567.0","check":"regression zero-exponent-separator 1","expected":"¥1,234,567","passed":false},{"actual":"¥0.0","check":"regression zero-exponent-separator 2","expected":"¥0","passed":false},{"actual":"$1,234.50","check":"control: dollars","expected":"$1,234.50","passed":true},{"actual":"-$1.50","check":"control: negative dollars","expected":"-$1.50","passed":true},{"actual":"-0,50 €","check":"control: negative euro cents","expected":"-0,50 €","passed":true},{"actual":"CHF 123'456.78","check":"control: franc","expected":"CHF 123'456.78","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression zero-exponent-separator 1\", \"actual\": \"¥1,234,567.0\", \"expected\": \"¥1,234,567\", \"passed\": false}, {\"check\": \"regression zero-exponent-separator 2\", \"actual\": \"¥0.0\", \"expected\": \"¥0\", \"passed\": false}, {\"check\": \"control: dollars\", \"actual\": \"$1,234.50\", \"expected\": \"$1,234.50\", \"passed\": true}, {\"check\": \"control: negative dollars\", \"actual\": \"-$1.50\", \"expected\": \"-$1.50\", \"passed\": true}, {\"check\": \"control: negative euro cents\", \"actual\": \"-0,50 €\", \"expected\": \"-0,50 €\", \"passed\": true}, {\"check\": \"control: franc\", \"actual\": \"CHF 123'456.78\", \"expected\": \"CHF 123'456.78\", \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}