Case 921
The rate was twelve percent and the year cost more
the_rate_was_twelve_percent_and_the_year_cost_more.eml - A loan is quoted at twelve percent a year, the quote is accurate, and the borrower budgets twelve percent of the principal for the year's interest. What the year actually costs when interest is charged monthly is computed below.
ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-19
EML
eml# Self-authored for the EML case corpus (no external origin). A loan is quoted
# at twelve percent a year, the quote is accurate, and the borrower budgets
# twelve percent of the principal for the year's interest. What the year
# actually costs when interest is charged monthly is computed below.
#
# The budget is careful. The quoted rate is the real contractual rate; twelve
# percent of the principal is computed exactly; the borrower pays every month on
# time; and the intent is exactly 'set aside the year's interest'.
#
# Twelve percent a year is one percent a month, and each month's interest is
# charged on a balance that already includes the previous months' interest, so
# the year costs 12.68 percent, not 12.
12 => quoted_annual_rate_percent
1 => monthly_rate_percent
10000 => principal
11268 => balance_after_twelve_monthly_charges
int(principal * quoted_annual_rate_percent / 100) => interest_the_quote_implies
balance_after_twelve_monthly_charges - principal => interest_actually_charged
interest_actually_charged - interest_the_quote_implies => interest_the_budget_missed
int(interest_the_budget_missed * 10000 / interest_the_quote_implies) => over_budget_per_myriad
int(principal * (100 + monthly_rate_percent) / 100) => balance_after_month_one
int(balance_after_month_one * (100 + monthly_rate_percent) / 100) => balance_after_month_two
balance_after_month_two - balance_after_month_one => month_two_interest
balance_after_month_one - principal => month_one_interest
"quoted rate : " + str(quoted_annual_rate_percent) + " percent a year" ^0
"charged as : " + str(monthly_rate_percent) + " percent a month, on the balance" ^0
"principal : " + str(principal) ^0
"" ^0
"interest the quote implies : " + str(interest_the_quote_implies) ^0
"month one interest : " + str(month_one_interest) + ", balance " + str(balance_after_month_one) ^0
"month two interest : " + str(month_two_interest) + ", balance " + str(balance_after_month_two) ^0
"balance after twelve months : " + str(balance_after_twelve_monthly_charges) ^0
"interest actually charged : " + str(interest_actually_charged) ^0
"interest the budget missed : " + str(interest_the_budget_missed) + ", " + str(over_budget_per_myriad) + " per ten thousand over" ^0
"" ^0
# ---- what the budget verified ----
"the interest budget" ^0
" rate : the real contractual rate, " + str(quoted_annual_rate_percent) + " percent" ^0
" arithmetic : twelve percent of the principal, exactly" ^0
" payments : every month, on time" ^0
" intent : set aside the year's interest" ^0
" months missed : 0" ^0
" verdict : TWELVE PERCENT OF 10000 IS 1200" ^0
"" ^0
" computing twelve percent of the principal exactly is the" ^0
" part done right here, and it is why " + str(interest_the_quote_implies) + " is precisely" ^0
" what the quoted rate names" ^0
"" ^0
# ---- what monthly charging does ----
"compounding" ^0
" month one : " + str(monthly_rate_percent) + " percent of " + str(principal) + ", " + str(month_one_interest) ^0
" month two : " + str(monthly_rate_percent) + " percent of " + str(balance_after_month_one) + ", " + str(month_two_interest) + " - the extra" ^0
" is interest on last month's interest" ^0
" twelve months of that : " + str(interest_actually_charged) + ", not " + str(interest_the_quote_implies) ^0
" what the quote names : the rate per period, times periods" ^0
" what the year costs : the rate per period, compounded" ^0
"" ^0
# ---- what the borrower got ----
"the year" ^0
" budgeted : " + str(interest_the_quote_implies) ^0
" charged : " + str(interest_actually_charged) ^0
" is the quote wrong : no; one percent a month is twelve a" ^0
" year, nominally" ^0
" is twelve percent what the year costs : no; each month" ^0
" charges on the last, and the year is " + str(interest_actually_charged) + " on " + str(principal) ^0
"" ^0
# ---- null control ----
# The same loan budgeted on the annual percentage yield - the rate compounded
# over the year - rather than the nominal rate.
1200 => nc_interest_budgeted_on_the_nominal_rate
1268 => nc_interest_budgeted_on_the_yield
68 => nc_shortfall_the_yield_removes
"null control - budget on the compounded yield" ^0
" interest budgeted, nominal rate : " + str(nc_interest_budgeted_on_the_nominal_rate) ^0
" interest budgeted, compounded yield : " + str(nc_interest_budgeted_on_the_yield) ^0
" shortfall the yield removes : " + str(nc_shortfall_the_yield_removes) ^0
" no loan and no rate changed; the budget stopped reading" ^0
" a per-month rate as a per-year cost" ^0
"" ^0
# ---- the rule ----
"what a twelve-percent-of-principal budget guarantees" ^0
" the budget is the quoted rate times the principal :" ^0
" exactly, real rate, exact arithmetic" ^0
" the budget covers the year's interest : not addressed;" ^0
" the rate is charged monthly on a growing balance, so" ^0
" the year costs " + str(interest_actually_charged) + " and the budget of " + str(interest_the_quote_implies) + " is " + str(interest_the_budget_missed) + " short" ^0
"" ^0
"a rate names how fast, and a cost depends on how often; twelve percent charged" ^0
"once and one percent charged twelve times are the same rate and different" ^0
"money, because the second charges interest on its own earlier charges" ^0
"" ^0
"Twelve percent of " + str(principal) + " is exactly " + str(interest_the_quote_implies) + " - the budget is right about the rate." ^0
"But the rate is charged monthly on a balance that carries the earlier months'" ^0
"interest, so the year costs " + str(interest_actually_charged) + ", " + str(interest_the_budget_missed) + " more, " + str(over_budget_per_myriad) + " per ten thousand over the" ^0
"budget, until the budget is set on the compounded yield." ^0Python (deterministic transpilation)
pythonquoted_annual_rate_percent = 12
monthly_rate_percent = 1
principal = 10000
balance_after_twelve_monthly_charges = 11268
interest_the_quote_implies = int(principal * quoted_annual_rate_percent / 100)
interest_actually_charged = balance_after_twelve_monthly_charges - principal
interest_the_budget_missed = interest_actually_charged - interest_the_quote_implies
over_budget_per_myriad = int(interest_the_budget_missed * 10000 / interest_the_quote_implies)
balance_after_month_one = int(principal * (100 + monthly_rate_percent) / 100)
balance_after_month_two = int(balance_after_month_one * (100 + monthly_rate_percent) / 100)
month_two_interest = balance_after_month_two - balance_after_month_one
month_one_interest = balance_after_month_one - principal
print("quoted rate : " + str(quoted_annual_rate_percent) + " percent a year")
print("charged as : " + str(monthly_rate_percent) + " percent a month, on the balance")
print("principal : " + str(principal))
print("")
print("interest the quote implies : " + str(interest_the_quote_implies))
print("month one interest : " + str(month_one_interest) + ", balance " + str(balance_after_month_one))
print("month two interest : " + str(month_two_interest) + ", balance " + str(balance_after_month_two))
print("balance after twelve months : " + str(balance_after_twelve_monthly_charges))
print("interest actually charged : " + str(interest_actually_charged))
print("interest the budget missed : " + str(interest_the_budget_missed) + ", " + str(over_budget_per_myriad) + " per ten thousand over")
print("")
print("the interest budget")
print(" rate : the real contractual rate, " + str(quoted_annual_rate_percent) + " percent")
print(" arithmetic : twelve percent of the principal, exactly")
print(" payments : every month, on time")
print(" intent : set aside the year's interest")
print(" months missed : 0")
print(" verdict : TWELVE PERCENT OF 10000 IS 1200")
print("")
print(" computing twelve percent of the principal exactly is the")
print(" part done right here, and it is why " + str(interest_the_quote_implies) + " is precisely")
print(" what the quoted rate names")
print("")
print("compounding")
print(" month one : " + str(monthly_rate_percent) + " percent of " + str(principal) + ", " + str(month_one_interest))
print(" month two : " + str(monthly_rate_percent) + " percent of " + str(balance_after_month_one) + ", " + str(month_two_interest) + " - the extra")
print(" is interest on last month's interest")
print(" twelve months of that : " + str(interest_actually_charged) + ", not " + str(interest_the_quote_implies))
print(" what the quote names : the rate per period, times periods")
print(" what the year costs : the rate per period, compounded")
print("")
print("the year")
print(" budgeted : " + str(interest_the_quote_implies))
print(" charged : " + str(interest_actually_charged))
print(" is the quote wrong : no; one percent a month is twelve a")
print(" year, nominally")
print(" is twelve percent what the year costs : no; each month")
print(" charges on the last, and the year is " + str(interest_actually_charged) + " on " + str(principal))
print("")
nc_interest_budgeted_on_the_nominal_rate = 1200
nc_interest_budgeted_on_the_yield = 1268
nc_shortfall_the_yield_removes = 68
print("null control - budget on the compounded yield")
print(" interest budgeted, nominal rate : " + str(nc_interest_budgeted_on_the_nominal_rate))
print(" interest budgeted, compounded yield : " + str(nc_interest_budgeted_on_the_yield))
print(" shortfall the yield removes : " + str(nc_shortfall_the_yield_removes))
print(" no loan and no rate changed; the budget stopped reading")
print(" a per-month rate as a per-year cost")
print("")
print("what a twelve-percent-of-principal budget guarantees")
print(" the budget is the quoted rate times the principal :")
print(" exactly, real rate, exact arithmetic")
print(" the budget covers the year's interest : not addressed;")
print(" the rate is charged monthly on a growing balance, so")
print(" the year costs " + str(interest_actually_charged) + " and the budget of " + str(interest_the_quote_implies) + " is " + str(interest_the_budget_missed) + " short")
print("")
print("a rate names how fast, and a cost depends on how often; twelve percent charged")
print("once and one percent charged twelve times are the same rate and different")
print("money, because the second charges interest on its own earlier charges")
print("")
print("Twelve percent of " + str(principal) + " is exactly " + str(interest_the_quote_implies) + " - the budget is right about the rate.")
print("But the rate is charged monthly on a balance that carries the earlier months'")
print("interest, so the year costs " + str(interest_actually_charged) + ", " + str(interest_the_budget_missed) + " more, " + str(over_budget_per_myriad) + " per ten thousand over the")
print("budget, until the budget is set on the compounded yield.")stdout (executed)
textquoted rate : 12 percent a year
charged as : 1 percent a month, on the balance
principal : 10000
interest the quote implies : 1200
month one interest : 100, balance 10100
month two interest : 101, balance 10201
balance after twelve months : 11268
interest actually charged : 1268
interest the budget missed : 68, 566 per ten thousand over
the interest budget
rate : the real contractual rate, 12 percent
arithmetic : twelve percent of the principal, exactly
payments : every month, on time
intent : set aside the year's interest
months missed : 0
verdict : TWELVE PERCENT OF 10000 IS 1200
computing twelve percent of the principal exactly is the
part done right here, and it is why 1200 is precisely
what the quoted rate names
compounding
month one : 1 percent of 10000, 100
month two : 1 percent of 10100, 101 - the extra
is interest on last month's interest
twelve months of that : 1268, not 1200
what the quote names : the rate per period, times periods
what the year costs : the rate per period, compounded
the year
budgeted : 1200
charged : 1268
is the quote wrong : no; one percent a month is twelve a
year, nominally
is twelve percent what the year costs : no; each month
charges on the last, and the year is 1268 on 10000
null control - budget on the compounded yield
interest budgeted, nominal rate : 1200
interest budgeted, compounded yield : 1268
shortfall the yield removes : 68
no loan and no rate changed; the budget stopped reading
a per-month rate as a per-year cost
what a twelve-percent-of-principal budget guarantees
the budget is the quoted rate times the principal :
exactly, real rate, exact arithmetic
the budget covers the year's interest : not addressed;
the rate is charged monthly on a growing balance, so
the year costs 1268 and the budget of 1200 is 68 short
a rate names how fast, and a cost depends on how often; twelve percent charged
once and one percent charged twelve times are the same rate and different
money, because the second charges interest on its own earlier charges
Twelve percent of 10000 is exactly 1200 - the budget is right about the rate.
But the rate is charged monthly on a balance that carries the earlier months'
interest, so the year costs 1268, 68 more, 566 per ten thousand over the
budget, until the budget is set on the compounded yield.Trace event types
eml:run:starteml:assigneml:outputeml:run:done