{"abstract":"Biweekly interest is computed as if there were 24 periods a year.","category":"Loan amortization schedules","checks":7,"contract":"x = {'principal', 'rate_bp', 'months'}. The monthly payment is the exact annuity rounded half-up; the biweekly payment is round_half_up(monthly/2), paid 26 times a year. Periodic interest is round_half_up(balance*bp/260000). When balance + interest <= payment the loan pays off with that amount. Return {'payment', 'periods', 'final_payment', 'total_interest'}.","evaluation_group":"w2-loan-amortization-schedules-accelerated-biweekly","failed_approach":"Using 14/365 of a year is a different day-count basis than the 26-period contract.","family":"w2-loan-amortization-schedules-accelerated-biweekly-biweekly-periodic-rate","id":"FA-58706","implementations":{"attempt":{"sha256":"7ff26fa823e5cd8af1401c795b51ebdc6a156757b4425820b74721ce8c9a3147","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    def rnd(n, d):\n        q, r = divmod(n, d)\n        return q + (1 if 2 * r >= d else 0)\n    def level(P, n):\n        if n <= 0 or P <= 0:\n            return 0\n        if bp == 0:\n            exact = Fraction(P, n)\n        else:\n            r = Fraction(bp, 120000)\n            exact = P * r / (1 - (1 + r) ** -n)\n        return math.floor(exact + Fraction(1, 2))\n    bp = x['rate_bp']\n    P = x['principal']\n    monthly = level(P, x['months'])\n    pay = rnd(monthly, 2)\n    bal = P\n    k = 0\n    total = 0\n    final = 0\n    while bal > 0 and k < 26 * x['months']:\n        k += 1\n        interest = rnd(bal * bp * 14, 3650000)\n        total += interest\n        if bal + interest <= pay:\n            final = bal + interest\n            bal = 0\n        else:\n            bal -= pay - interest\n    return {'payment': pay, 'periods': k, 'final_payment': final, 'total_interest': total}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 1200, 'months': 12}, {'payment': 222, 'periods': 24, 'final_payment': 187, 'total_interest': 293}], ['regression: biweekly periodic rate, partial-repair probe', {'principal': 5000, 'rate_bp': 725, 'months': 36}, {'payment': 78, 'periods': 71, 'final_payment': 58, 'total_interest': 518}], ['control 1', {'principal': 250000, 'rate_bp': 0, 'months': 7}, {'payment': 17857, 'periods': 15, 'final_payment': 2, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 3', {'principal': 1000000, 'rate_bp': 0, 'months': 60}, {'payment': 8334, 'periods': 120, 'final_payment': 8254, 'total_interest': 0}], ['control 4', {'principal': 1000000, 'rate_bp': 0, 'months': 36}, {'payment': 13889, 'periods': 72, 'final_payment': 13881, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 7}, {'payment': 357, 'periods': 15, 'final_payment': 2, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 250000, 'rate_bp': 725, 'months': 36}, {'payment': 3874, 'periods': 72, 'final_payment': 951, 'total_interest': 26005}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 60}, {'payment': 2084, 'periods': 120, 'final_payment': 2004, 'total_interest': 0}], ['control 3', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 4', {'principal': 100000, 'rate_bp': 0, 'months': 12}, {'payment': 4167, 'periods': 24, 'final_payment': 4159, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 36}, {'payment': 70, 'periods': 72, 'final_payment': 30, 'total_interest': 0}], ['control 6', {'principal': 5000, 'rate_bp': 0, 'months': 12}, {'payment': 209, 'periods': 24, 'final_payment': 193, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 100000, 'rate_bp': 600, 'months': 36}, {'payment': 1521, 'periods': 72, 'final_payment': 590, 'total_interest': 8581}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 2', {'principal': 1000000, 'rate_bp': 0, 'months': 7}, {'payment': 71429, 'periods': 14, 'final_payment': 71423, 'total_interest': 0}], ['control 3', {'principal': 250000, 'rate_bp': 0, 'months': 7}, {'payment': 17857, 'periods': 15, 'final_payment': 2, 'total_interest': 0}], ['control 4', {'principal': 250000, 'rate_bp': 0, 'months': 12}, {'payment': 10417, 'periods': 24, 'final_payment': 10409, 'total_interest': 0}], ['control 5', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 6', {'principal': 100000, 'rate_bp': 0, 'months': 60}, {'payment': 834, 'periods': 120, 'final_payment': 754, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 1200, 'months': 36}, {'payment': 83, 'periods': 71, 'final_payment': 64, 'total_interest': 874}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 12}, {'payment': 10417, 'periods': 24, 'final_payment': 10409, 'total_interest': 0}], ['control 3', {'principal': 1000000, 'rate_bp': 0, 'months': 36}, {'payment': 13889, 'periods': 72, 'final_payment': 13881, 'total_interest': 0}], ['control 4', {'principal': 1000000, 'rate_bp': 0, 'months': 12}, {'payment': 41667, 'periods': 24, 'final_payment': 41659, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 12}, {'payment': 209, 'periods': 24, 'final_payment': 193, 'total_interest': 0}], ['control 6', {'principal': 5000, 'rate_bp': 0, 'months': 7}, {'payment': 357, 'periods': 15, 'final_payment': 2, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 725, 'months': 60}, {'payment': 50, 'periods': 118, 'final_payment': 21, 'total_interest': 871}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 3', {'principal': 5000, 'rate_bp': 0, 'months': 36}, {'payment': 70, 'periods': 72, 'final_payment': 30, 'total_interest': 0}], ['control 4', {'principal': 250000, 'rate_bp': 0, 'months': 60}, {'payment': 2084, 'periods': 120, 'final_payment': 2004, 'total_interest': 0}], ['control 5', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 6', {'principal': 1000000, 'rate_bp': 0, 'months': 12}, {'payment': 41667, 'periods': 24, 'final_payment': 41659, 'total_interest': 0}]]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'raised ' + type(exc).__name__\n    check(label, actual, 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":"fbee88ad7262bc40194e7f682193c8b403c9daeb46a74c1336feec72d809d295","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    def rnd(n, d):\n        q, r = divmod(n, d)\n        return q + (1 if 2 * r >= d else 0)\n    def level(P, n):\n        if n <= 0 or P <= 0:\n            return 0\n        if bp == 0:\n            exact = Fraction(P, n)\n        else:\n            r = Fraction(bp, 120000)\n            exact = P * r / (1 - (1 + r) ** -n)\n        return math.floor(exact + Fraction(1, 2))\n    bp = x['rate_bp']\n    P = x['principal']\n    monthly = level(P, x['months'])\n    pay = rnd(monthly, 2)\n    bal = P\n    k = 0\n    total = 0\n    final = 0\n    while bal > 0 and k < 26 * x['months']:\n        k += 1\n        interest = rnd(bal * bp, 240000)\n        total += interest\n        if bal + interest <= pay:\n            final = bal + interest\n            bal = 0\n        else:\n            bal -= pay - interest\n    return {'payment': pay, 'periods': k, 'final_payment': final, 'total_interest': total}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 1200, 'months': 12}, {'payment': 222, 'periods': 24, 'final_payment': 187, 'total_interest': 293}], ['regression: biweekly periodic rate, partial-repair probe', {'principal': 5000, 'rate_bp': 725, 'months': 36}, {'payment': 78, 'periods': 71, 'final_payment': 58, 'total_interest': 518}], ['control 1', {'principal': 250000, 'rate_bp': 0, 'months': 7}, {'payment': 17857, 'periods': 15, 'final_payment': 2, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 3', {'principal': 1000000, 'rate_bp': 0, 'months': 60}, {'payment': 8334, 'periods': 120, 'final_payment': 8254, 'total_interest': 0}], ['control 4', {'principal': 1000000, 'rate_bp': 0, 'months': 36}, {'payment': 13889, 'periods': 72, 'final_payment': 13881, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 7}, {'payment': 357, 'periods': 15, 'final_payment': 2, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 250000, 'rate_bp': 725, 'months': 36}, {'payment': 3874, 'periods': 72, 'final_payment': 951, 'total_interest': 26005}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 60}, {'payment': 2084, 'periods': 120, 'final_payment': 2004, 'total_interest': 0}], ['control 3', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 4', {'principal': 100000, 'rate_bp': 0, 'months': 12}, {'payment': 4167, 'periods': 24, 'final_payment': 4159, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 36}, {'payment': 70, 'periods': 72, 'final_payment': 30, 'total_interest': 0}], ['control 6', {'principal': 5000, 'rate_bp': 0, 'months': 12}, {'payment': 209, 'periods': 24, 'final_payment': 193, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 100000, 'rate_bp': 600, 'months': 36}, {'payment': 1521, 'periods': 72, 'final_payment': 590, 'total_interest': 8581}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 2', {'principal': 1000000, 'rate_bp': 0, 'months': 7}, {'payment': 71429, 'periods': 14, 'final_payment': 71423, 'total_interest': 0}], ['control 3', {'principal': 250000, 'rate_bp': 0, 'months': 7}, {'payment': 17857, 'periods': 15, 'final_payment': 2, 'total_interest': 0}], ['control 4', {'principal': 250000, 'rate_bp': 0, 'months': 12}, {'payment': 10417, 'periods': 24, 'final_payment': 10409, 'total_interest': 0}], ['control 5', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 6', {'principal': 100000, 'rate_bp': 0, 'months': 60}, {'payment': 834, 'periods': 120, 'final_payment': 754, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 1200, 'months': 36}, {'payment': 83, 'periods': 71, 'final_payment': 64, 'total_interest': 874}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 12}, {'payment': 10417, 'periods': 24, 'final_payment': 10409, 'total_interest': 0}], ['control 3', {'principal': 1000000, 'rate_bp': 0, 'months': 36}, {'payment': 13889, 'periods': 72, 'final_payment': 13881, 'total_interest': 0}], ['control 4', {'principal': 1000000, 'rate_bp': 0, 'months': 12}, {'payment': 41667, 'periods': 24, 'final_payment': 41659, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 12}, {'payment': 209, 'periods': 24, 'final_payment': 193, 'total_interest': 0}], ['control 6', {'principal': 5000, 'rate_bp': 0, 'months': 7}, {'payment': 357, 'periods': 15, 'final_payment': 2, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 725, 'months': 60}, {'payment': 50, 'periods': 118, 'final_payment': 21, 'total_interest': 871}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 3', {'principal': 5000, 'rate_bp': 0, 'months': 36}, {'payment': 70, 'periods': 72, 'final_payment': 30, 'total_interest': 0}], ['control 4', {'principal': 250000, 'rate_bp': 0, 'months': 60}, {'payment': 2084, 'periods': 120, 'final_payment': 2004, 'total_interest': 0}], ['control 5', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 6', {'principal': 1000000, 'rate_bp': 0, 'months': 12}, {'payment': 41667, 'periods': 24, 'final_payment': 41659, 'total_interest': 0}]]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'raised ' + type(exc).__name__\n    check(label, actual, 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":"1001513379e271e49693b555c15a856ceab66dfacd3187925e4d85d6e32e0e68","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    def rnd(n, d):\n        q, r = divmod(n, d)\n        return q + (1 if 2 * r >= d else 0)\n    def level(P, n):\n        if n <= 0 or P <= 0:\n            return 0\n        if bp == 0:\n            exact = Fraction(P, n)\n        else:\n            r = Fraction(bp, 120000)\n            exact = P * r / (1 - (1 + r) ** -n)\n        return math.floor(exact + Fraction(1, 2))\n    bp = x['rate_bp']\n    P = x['principal']\n    monthly = level(P, x['months'])\n    pay = rnd(monthly, 2)\n    bal = P\n    k = 0\n    total = 0\n    final = 0\n    while bal > 0 and k < 26 * x['months']:\n        k += 1\n        interest = rnd(bal * bp, 260000)\n        total += interest\n        if bal + interest <= pay:\n            final = bal + interest\n            bal = 0\n        else:\n            bal -= pay - interest\n    return {'payment': pay, 'periods': k, 'final_payment': final, 'total_interest': total}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 1200, 'months': 12}, {'payment': 222, 'periods': 24, 'final_payment': 187, 'total_interest': 293}], ['regression: biweekly periodic rate, partial-repair probe', {'principal': 5000, 'rate_bp': 725, 'months': 36}, {'payment': 78, 'periods': 71, 'final_payment': 58, 'total_interest': 518}], ['control 1', {'principal': 250000, 'rate_bp': 0, 'months': 7}, {'payment': 17857, 'periods': 15, 'final_payment': 2, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 3', {'principal': 1000000, 'rate_bp': 0, 'months': 60}, {'payment': 8334, 'periods': 120, 'final_payment': 8254, 'total_interest': 0}], ['control 4', {'principal': 1000000, 'rate_bp': 0, 'months': 36}, {'payment': 13889, 'periods': 72, 'final_payment': 13881, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 7}, {'payment': 357, 'periods': 15, 'final_payment': 2, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 250000, 'rate_bp': 725, 'months': 36}, {'payment': 3874, 'periods': 72, 'final_payment': 951, 'total_interest': 26005}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 60}, {'payment': 2084, 'periods': 120, 'final_payment': 2004, 'total_interest': 0}], ['control 3', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 4', {'principal': 100000, 'rate_bp': 0, 'months': 12}, {'payment': 4167, 'periods': 24, 'final_payment': 4159, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 36}, {'payment': 70, 'periods': 72, 'final_payment': 30, 'total_interest': 0}], ['control 6', {'principal': 5000, 'rate_bp': 0, 'months': 12}, {'payment': 209, 'periods': 24, 'final_payment': 193, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 100000, 'rate_bp': 600, 'months': 36}, {'payment': 1521, 'periods': 72, 'final_payment': 590, 'total_interest': 8581}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 2', {'principal': 1000000, 'rate_bp': 0, 'months': 7}, {'payment': 71429, 'periods': 14, 'final_payment': 71423, 'total_interest': 0}], ['control 3', {'principal': 250000, 'rate_bp': 0, 'months': 7}, {'payment': 17857, 'periods': 15, 'final_payment': 2, 'total_interest': 0}], ['control 4', {'principal': 250000, 'rate_bp': 0, 'months': 12}, {'payment': 10417, 'periods': 24, 'final_payment': 10409, 'total_interest': 0}], ['control 5', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 6', {'principal': 100000, 'rate_bp': 0, 'months': 60}, {'payment': 834, 'periods': 120, 'final_payment': 754, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 1200, 'months': 36}, {'payment': 83, 'periods': 71, 'final_payment': 64, 'total_interest': 874}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 250000, 'rate_bp': 0, 'months': 12}, {'payment': 10417, 'periods': 24, 'final_payment': 10409, 'total_interest': 0}], ['control 3', {'principal': 1000000, 'rate_bp': 0, 'months': 36}, {'payment': 13889, 'periods': 72, 'final_payment': 13881, 'total_interest': 0}], ['control 4', {'principal': 1000000, 'rate_bp': 0, 'months': 12}, {'payment': 41667, 'periods': 24, 'final_payment': 41659, 'total_interest': 0}], ['control 5', {'principal': 5000, 'rate_bp': 0, 'months': 12}, {'payment': 209, 'periods': 24, 'final_payment': 193, 'total_interest': 0}], ['control 6', {'principal': 5000, 'rate_bp': 0, 'months': 7}, {'payment': 357, 'periods': 15, 'final_payment': 2, 'total_interest': 0}]], [['regression: biweekly periodic rate', {'principal': 5000, 'rate_bp': 725, 'months': 60}, {'payment': 50, 'periods': 118, 'final_payment': 21, 'total_interest': 871}], ['control 1', {'principal': 100000, 'rate_bp': 0, 'months': 7}, {'payment': 7143, 'periods': 14, 'final_payment': 7141, 'total_interest': 0}], ['control 2', {'principal': 100000, 'rate_bp': 0, 'months': 36}, {'payment': 1389, 'periods': 72, 'final_payment': 1381, 'total_interest': 0}], ['control 3', {'principal': 5000, 'rate_bp': 0, 'months': 36}, {'payment': 70, 'periods': 72, 'final_payment': 30, 'total_interest': 0}], ['control 4', {'principal': 250000, 'rate_bp': 0, 'months': 60}, {'payment': 2084, 'periods': 120, 'final_payment': 2004, 'total_interest': 0}], ['control 5', {'principal': 250000, 'rate_bp': 0, 'months': 36}, {'payment': 3472, 'periods': 73, 'final_payment': 16, 'total_interest': 0}], ['control 6', {'principal': 1000000, 'rate_bp': 0, 'months': 12}, {'payment': 41667, 'periods': 24, 'final_payment': 41659, 'total_interest': 0}]]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'raised ' + type(exc).__name__\n    check(label, actual, 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 stipulated toy lending rules stated in the contract; money is integer cents and rates are basis points; it makes no claim of conformance to any regulation, servicing standard or product. 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-loan-amortization-schedules-accelerated-biweekly-biweekly-periodic-rate","generated_at":"2026-09-29T14:46:29.298455+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Amortization engines drive borrower statements, payoff quotes and investor remittances; a misplaced rounding step, boundary or ordering rule compounds across hundreds of periods.","repair":"Divide the annual rate by 26 periods.","root_cause":"The semi-monthly divisor is used for the biweekly rate.","sha256":"f670777e71b90eb81c9533e4cc738a1a37c49b0b1529245a7266fe73b0f8645d","title":"Accelerated biweekly schedule: biweekly periodic rate · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.605,"exit_code":1,"observations":[{"actual":{"final_payment":187,"payment":222,"periods":24,"total_interest":293},"check":"regression: biweekly periodic rate","expected":{"final_payment":187,"payment":222,"periods":24,"total_interest":293},"passed":true},{"actual":{"final_payment":55,"payment":78,"periods":71,"total_interest":515},"check":"regression: biweekly periodic rate, partial-repair probe","expected":{"final_payment":58,"payment":78,"periods":71,"total_interest":518},"passed":false},{"actual":{"final_payment":2,"payment":17857,"periods":15,"total_interest":0},"check":"control 1","expected":{"final_payment":2,"payment":17857,"periods":15,"total_interest":0},"passed":true},{"actual":{"final_payment":16,"payment":3472,"periods":73,"total_interest":0},"check":"control 2","expected":{"final_payment":16,"payment":3472,"periods":73,"total_interest":0},"passed":true},{"actual":{"final_payment":8254,"payment":8334,"periods":120,"total_interest":0},"check":"control 3","expected":{"final_payment":8254,"payment":8334,"periods":120,"total_interest":0},"passed":true},{"actual":{"final_payment":13881,"payment":13889,"periods":72,"total_interest":0},"check":"control 4","expected":{"final_payment":13881,"payment":13889,"periods":72,"total_interest":0},"passed":true},{"actual":{"final_payment":2,"payment":357,"periods":15,"total_interest":0},"check":"control 5","expected":{"final_payment":2,"payment":357,"periods":15,"total_interest":0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: biweekly periodic rate\", \"actual\": {\"payment\": 222, \"periods\": 24, \"final_payment\": 187, \"total_interest\": 293}, \"expected\": {\"payment\": 222, \"periods\": 24, \"final_payment\": 187, \"total_interest\": 293}, \"passed\": true}, {\"check\": \"regression: biweekly periodic rate, partial-repair probe\", \"actual\": {\"payment\": 78, \"periods\": 71, \"final_payment\": 55, \"total_interest\": 515}, \"expected\": {\"payment\": 78, \"periods\": 71, \"final_payment\": 58, \"total_interest\": 518}, \"passed\": false}, {\"check\": \"control 1\", \"actual\": {\"payment\": 17857, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"expected\": {\"payment\": 17857, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 2\", \"actual\": {\"payment\": 3472, \"periods\": 73, \"final_payment\": 16, \"total_interest\": 0}, \"expected\": {\"payment\": 3472, \"periods\": 73, \"final_payment\": 16, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 3\", \"actual\": {\"payment\": 8334, \"periods\": 120, \"final_payment\": 8254, \"total_interest\": 0}, \"expected\": {\"payment\": 8334, \"periods\": 120, \"final_payment\": 8254, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"payment\": 13889, \"periods\": 72, \"final_payment\": 13881, \"total_interest\": 0}, \"expected\": {\"payment\": 13889, \"periods\": 72, \"final_payment\": 13881, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 5\", \"actual\": {\"payment\": 357, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"expected\": {\"payment\": 357, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.074,"exit_code":1,"observations":[{"actual":{"final_payment":213,"payment":222,"periods":24,"total_interest":319},"check":"regression: biweekly periodic rate","expected":{"final_payment":187,"payment":222,"periods":24,"total_interest":293},"passed":false},{"actual":{"final_payment":29,"payment":78,"periods":72,"total_interest":567},"check":"regression: biweekly periodic rate, partial-repair probe","expected":{"final_payment":58,"payment":78,"periods":71,"total_interest":518},"passed":false},{"actual":{"final_payment":2,"payment":17857,"periods":15,"total_interest":0},"check":"control 1","expected":{"final_payment":2,"payment":17857,"periods":15,"total_interest":0},"passed":true},{"actual":{"final_payment":16,"payment":3472,"periods":73,"total_interest":0},"check":"control 2","expected":{"final_payment":16,"payment":3472,"periods":73,"total_interest":0},"passed":true},{"actual":{"final_payment":8254,"payment":8334,"periods":120,"total_interest":0},"check":"control 3","expected":{"final_payment":8254,"payment":8334,"periods":120,"total_interest":0},"passed":true},{"actual":{"final_payment":13881,"payment":13889,"periods":72,"total_interest":0},"check":"control 4","expected":{"final_payment":13881,"payment":13889,"periods":72,"total_interest":0},"passed":true},{"actual":{"final_payment":2,"payment":357,"periods":15,"total_interest":0},"check":"control 5","expected":{"final_payment":2,"payment":357,"periods":15,"total_interest":0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: biweekly periodic rate\", \"actual\": {\"payment\": 222, \"periods\": 24, \"final_payment\": 213, \"total_interest\": 319}, \"expected\": {\"payment\": 222, \"periods\": 24, \"final_payment\": 187, \"total_interest\": 293}, \"passed\": false}, {\"check\": \"regression: biweekly periodic rate, partial-repair probe\", \"actual\": {\"payment\": 78, \"periods\": 72, \"final_payment\": 29, \"total_interest\": 567}, \"expected\": {\"payment\": 78, \"periods\": 71, \"final_payment\": 58, \"total_interest\": 518}, \"passed\": false}, {\"check\": \"control 1\", \"actual\": {\"payment\": 17857, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"expected\": {\"payment\": 17857, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 2\", \"actual\": {\"payment\": 3472, \"periods\": 73, \"final_payment\": 16, \"total_interest\": 0}, \"expected\": {\"payment\": 3472, \"periods\": 73, \"final_payment\": 16, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 3\", \"actual\": {\"payment\": 8334, \"periods\": 120, \"final_payment\": 8254, \"total_interest\": 0}, \"expected\": {\"payment\": 8334, \"periods\": 120, \"final_payment\": 8254, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"payment\": 13889, \"periods\": 72, \"final_payment\": 13881, \"total_interest\": 0}, \"expected\": {\"payment\": 13889, \"periods\": 72, \"final_payment\": 13881, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 5\", \"actual\": {\"payment\": 357, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"expected\": {\"payment\": 357, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.476,"exit_code":0,"observations":[{"actual":{"final_payment":187,"payment":222,"periods":24,"total_interest":293},"check":"regression: biweekly periodic rate","expected":{"final_payment":187,"payment":222,"periods":24,"total_interest":293},"passed":true},{"actual":{"final_payment":58,"payment":78,"periods":71,"total_interest":518},"check":"regression: biweekly periodic rate, partial-repair probe","expected":{"final_payment":58,"payment":78,"periods":71,"total_interest":518},"passed":true},{"actual":{"final_payment":2,"payment":17857,"periods":15,"total_interest":0},"check":"control 1","expected":{"final_payment":2,"payment":17857,"periods":15,"total_interest":0},"passed":true},{"actual":{"final_payment":16,"payment":3472,"periods":73,"total_interest":0},"check":"control 2","expected":{"final_payment":16,"payment":3472,"periods":73,"total_interest":0},"passed":true},{"actual":{"final_payment":8254,"payment":8334,"periods":120,"total_interest":0},"check":"control 3","expected":{"final_payment":8254,"payment":8334,"periods":120,"total_interest":0},"passed":true},{"actual":{"final_payment":13881,"payment":13889,"periods":72,"total_interest":0},"check":"control 4","expected":{"final_payment":13881,"payment":13889,"periods":72,"total_interest":0},"passed":true},{"actual":{"final_payment":2,"payment":357,"periods":15,"total_interest":0},"check":"control 5","expected":{"final_payment":2,"payment":357,"periods":15,"total_interest":0},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: biweekly periodic rate\", \"actual\": {\"payment\": 222, \"periods\": 24, \"final_payment\": 187, \"total_interest\": 293}, \"expected\": {\"payment\": 222, \"periods\": 24, \"final_payment\": 187, \"total_interest\": 293}, \"passed\": true}, {\"check\": \"regression: biweekly periodic rate, partial-repair probe\", \"actual\": {\"payment\": 78, \"periods\": 71, \"final_payment\": 58, \"total_interest\": 518}, \"expected\": {\"payment\": 78, \"periods\": 71, \"final_payment\": 58, \"total_interest\": 518}, \"passed\": true}, {\"check\": \"control 1\", \"actual\": {\"payment\": 17857, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"expected\": {\"payment\": 17857, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 2\", \"actual\": {\"payment\": 3472, \"periods\": 73, \"final_payment\": 16, \"total_interest\": 0}, \"expected\": {\"payment\": 3472, \"periods\": 73, \"final_payment\": 16, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 3\", \"actual\": {\"payment\": 8334, \"periods\": 120, \"final_payment\": 8254, \"total_interest\": 0}, \"expected\": {\"payment\": 8334, \"periods\": 120, \"final_payment\": 8254, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"payment\": 13889, \"periods\": 72, \"final_payment\": 13881, \"total_interest\": 0}, \"expected\": {\"payment\": 13889, \"periods\": 72, \"final_payment\": 13881, \"total_interest\": 0}, \"passed\": true}, {\"check\": \"control 5\", \"actual\": {\"payment\": 357, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"expected\": {\"payment\": 357, \"periods\": 15, \"final_payment\": 2, \"total_interest\": 0}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}