At high rate and long duration the rounded instalment converges to C*i from
above and lands exactly on the first month's interest, leaving zero principal:
at 99 % the frontier is 294 months for the maximum capital. The schedule would
never terminate.
Checking the first month suffices: once principal is positive the outstanding
capital decreases, so interest decreases and principal grows. The check must
stay after the bounds checks, since it calls monthly_repayment() and that
function's expect() is justified by them.
creating_loan_offer_with_limit_inputs_works asserted that the three maxima
combined were valid, which this invariant makes false. The valid domain is no
longer a box. It is replaced by the corner that actually maximises the
instalment, duration 1, at 1 082 499 999,99 EUR against 82 500 000,00 EUR for
the corner it tested before.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>