FAILURE MAP
← Case archive

FA-58342 / Loan amortization schedules / Member archive

Level payment with final adjustment: monthly periodic rate · case 02

Quoted payments are roughly twelve times the interest a borrower actually owes.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

x = {'principal', 'rate_bp' (annual, monthly rate = bp/120000), 'months', 'round': 'nearest'|'up'}. The exact annuity payment P*r/(1-(1+r)^-n) (P/n at zero rate) is rounded half-up ('nearest') or up to the cent. Monthly interest is round_half_up(balance*bp/120000); months 1..n-1 pay the level payment and month n pays balance + interest. Return {'payment', 'final_payment', 'total_interest'}.

Why this case matters

Amortization engines drive borrower statements, payoff quotes and investor remittances; a misplaced rounding step, boundary or ordering rule compounds across hundreds of periods.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: monthly periodic rate{"final_payment": 164, "payment": 168, "total_interest": 0}{"final_payment": 166, "payment": 167, "total_interest": 0}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗