Case 982
The pump five cents lower was twenty kilometres away
the_pump_five_cents_lower_was_twenty_kilometres_away.eml - A driver sees that a station in the next town, 20 km away, sells petrol 5 cents a litre cheaper than the one at home, drives there to fill 40 litres, and books 2.00 saved on every fill. What the trip itself costs is computed below.
ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-23
EML
eml# Self-authored for the EML case corpus (no external origin). A driver sees that
# a station in the next town, 20 km away, sells petrol 5 cents a litre cheaper
# than the one at home, drives there to fill 40 litres, and books 2.00 saved on
# every fill. What the trip itself costs is computed below.
#
# The reasoning is careful. Both prices were read off the pumps; 40 litres were
# really bought; 5 cents times 40 really is 200 cents; and the intent is exactly
# 'spend less on fuel'.
#
# The 40 km there and back burns fuel too: at 8 litres per 100 km that is 3.2
# litres, 560 cents at the far pump's price, against the 200 saved on the fill.
# The trip turns a saving of 200 into a loss of 360. At 5 cents a litre the
# drive pays only if the round trip is under 14 km - or, at this distance, if
# the fill is 112 litres, more than the 50-litre tank holds.
180 => home_price_cents_per_litre
175 => far_price_cents_per_litre
40 => litres_bought
20 => km_to_the_far_pump_each_way
8 => litres_per_100_km
50 => tank_litres
home_price_cents_per_litre - far_price_cents_per_litre => price_gap_cents_per_litre
price_gap_cents_per_litre * litres_bought => saving_at_the_pump_cents
2 * km_to_the_far_pump_each_way => round_trip_km
int(round_trip_km * litres_per_100_km * 10 / 100) => fuel_for_the_trip_tenths_of_a_litre
int(fuel_for_the_trip_tenths_of_a_litre * far_price_cents_per_litre / 10) => fuel_for_the_trip_cents
fuel_for_the_trip_cents - saving_at_the_pump_cents => loss_on_the_trip_cents
int(litres_per_100_km * far_price_cents_per_litre * 10 / 100) => driving_cost_tenths_of_a_cent_per_km
int(saving_at_the_pump_cents * 10 / driving_cost_tenths_of_a_cent_per_km) => break_even_round_trip_km
int(fuel_for_the_trip_cents / price_gap_cents_per_litre) => litres_needed_to_break_even_at_this_distance
litres_needed_to_break_even_at_this_distance - tank_litres => more_than_the_tank_holds_by_litres
"home pump : " + str(home_price_cents_per_litre) + " cents a litre" ^0
"far pump : " + str(far_price_cents_per_litre) + " cents a litre, " + str(km_to_the_far_pump_each_way) + " km away" ^0
"fill : " + str(litres_bought) + " litres, saving " + str(saving_at_the_pump_cents) + " cents at the pump" ^0
"" ^0
"the trip : " + str(round_trip_km) + " km there and back at " + str(litres_per_100_km) + " litres per 100 km" ^0
"fuel for the trip : " + str(fuel_for_the_trip_tenths_of_a_litre) + " tenths of a litre, " + str(fuel_for_the_trip_cents) + " cents" ^0
"loss on the trip : " + str(loss_on_the_trip_cents) + " cents" ^0
"" ^0
"driving cost : " + str(driving_cost_tenths_of_a_cent_per_km) + " tenths of a cent per km" ^0
"break-even round trip : " + str(break_even_round_trip_km) + " km for this fill" ^0
"break-even fill at this distance : " + str(litres_needed_to_break_even_at_this_distance) + " litres, " + str(more_than_the_tank_holds_by_litres) + " more than the tank holds" ^0
"" ^0
# ---- what the driver verified ----
"the cheaper-pump reasoning" ^0
" prices : " + str(home_price_cents_per_litre) + " and " + str(far_price_cents_per_litre) + ", read off the pumps" ^0
" fill : " + str(litres_bought) + " litres, really bought" ^0
" arithmetic : " + str(price_gap_cents_per_litre) + " cents times " + str(litres_bought) + " is " + str(saving_at_the_pump_cents) + " cents" ^0
" intent : spend less on fuel" ^0
" facts wrong : 0" ^0
" verdict : THE FAR PUMP SAVES " + str(saving_at_the_pump_cents) + " CENTS A FILL" ^0
"" ^0
" reading both pump prices is the part done right here, and it" ^0
" is why the " + str(saving_at_the_pump_cents) + " cents at the pump are exactly right" ^0
"" ^0
# ---- what the trip costs ----
"the price of getting there" ^0
" what the saving scales with : the litres bought, " + str(litres_bought) ^0
" what the trip costs : the kilometres driven, " + str(round_trip_km) + ", whatever" ^0
" is bought at the end" ^0
" fuel burnt on the way : " + str(fuel_for_the_trip_tenths_of_a_litre) + " tenths of a litre, " + str(fuel_for_the_trip_cents) + " cents" ^0
" the balance : a saving of " + str(saving_at_the_pump_cents) + " against a cost of " + str(fuel_for_the_trip_cents) ^0
" when the trip pays : when the round trip is under " + str(break_even_round_trip_km) + " km, or" ^0
" the fill over " + str(litres_needed_to_break_even_at_this_distance) + " litres" ^0
"" ^0
# ---- what the driver got ----
"the fuel budget" ^0
" believed : " + str(saving_at_the_pump_cents) + " cents saved every fill" ^0
" actual : " + str(loss_on_the_trip_cents) + " cents lost every fill, before counting the hour" ^0
" is either price wrong : no" ^0
" is a lower price a saving : only after the cost of reaching" ^0
" it is paid" ^0
"" ^0
# ---- null control ----
# The same fill judged with the trip's fuel counted instead of the pump price
# alone.
200 => nc_saving_at_the_pump_cents
560 => nc_fuel_burnt_getting_there_and_back_cents
360 => nc_loss_the_trip_turns_it_into_cents
"null control - count the trip" ^0
" saving at the pump : " + str(nc_saving_at_the_pump_cents) + " cents" ^0
" fuel burnt getting there and back : " + str(nc_fuel_burnt_getting_there_and_back_cents) + " cents" ^0
" loss the trip turns it into : " + str(nc_loss_the_trip_turns_it_into_cents) + " cents" ^0
" no pump and no price changed; the fixed cost of reaching the" ^0
" lower price was set against the saving it buys" ^0
"" ^0
# ---- the rule ----
"what a lower pump price guarantees" ^0
" each litre bought there costs " + str(price_gap_cents_per_litre) + " cents less : exactly" ^0
" filling up there saves money : not addressed; the " + str(round_trip_km) + " km trip" ^0
" burns " + str(fuel_for_the_trip_tenths_of_a_litre) + " tenths of a litre, " + str(fuel_for_the_trip_cents) + " cents, against a saving of " + str(saving_at_the_pump_cents) + ";" ^0
" the break-even is a " + str(break_even_round_trip_km) + " km round trip, or a " + str(litres_needed_to_break_even_at_this_distance) + "-litre fill" ^0
"" ^0
"a saving per unit is multiplied by the units, and a cost of getting there is" ^0
"not; the small saving has to be bought in bulk before it can pay for the road" ^0
"" ^0
"The far pump is " + str(price_gap_cents_per_litre) + " cents a litre cheaper and the " + str(litres_bought) + " litres save " + str(saving_at_the_pump_cents) + " cents - all" ^0
"true. But the " + str(round_trip_km) + " km there and back burn " + str(fuel_for_the_trip_cents) + " cents of fuel, so each fill loses" ^0
"" + str(loss_on_the_trip_cents) + ", and the trip would pay only under " + str(break_even_round_trip_km) + " km or over " + str(litres_needed_to_break_even_at_this_distance) + " litres, until the cost of" ^0
"reaching the price is set against the saving it buys." ^0Python (deterministic transpilation)
pythonhome_price_cents_per_litre = 180
far_price_cents_per_litre = 175
litres_bought = 40
km_to_the_far_pump_each_way = 20
litres_per_100_km = 8
tank_litres = 50
price_gap_cents_per_litre = home_price_cents_per_litre - far_price_cents_per_litre
saving_at_the_pump_cents = price_gap_cents_per_litre * litres_bought
round_trip_km = 2 * km_to_the_far_pump_each_way
fuel_for_the_trip_tenths_of_a_litre = int(round_trip_km * litres_per_100_km * 10 / 100)
fuel_for_the_trip_cents = int(fuel_for_the_trip_tenths_of_a_litre * far_price_cents_per_litre / 10)
loss_on_the_trip_cents = fuel_for_the_trip_cents - saving_at_the_pump_cents
driving_cost_tenths_of_a_cent_per_km = int(litres_per_100_km * far_price_cents_per_litre * 10 / 100)
break_even_round_trip_km = int(saving_at_the_pump_cents * 10 / driving_cost_tenths_of_a_cent_per_km)
litres_needed_to_break_even_at_this_distance = int(fuel_for_the_trip_cents / price_gap_cents_per_litre)
more_than_the_tank_holds_by_litres = litres_needed_to_break_even_at_this_distance - tank_litres
print("home pump : " + str(home_price_cents_per_litre) + " cents a litre")
print("far pump : " + str(far_price_cents_per_litre) + " cents a litre, " + str(km_to_the_far_pump_each_way) + " km away")
print("fill : " + str(litres_bought) + " litres, saving " + str(saving_at_the_pump_cents) + " cents at the pump")
print("")
print("the trip : " + str(round_trip_km) + " km there and back at " + str(litres_per_100_km) + " litres per 100 km")
print("fuel for the trip : " + str(fuel_for_the_trip_tenths_of_a_litre) + " tenths of a litre, " + str(fuel_for_the_trip_cents) + " cents")
print("loss on the trip : " + str(loss_on_the_trip_cents) + " cents")
print("")
print("driving cost : " + str(driving_cost_tenths_of_a_cent_per_km) + " tenths of a cent per km")
print("break-even round trip : " + str(break_even_round_trip_km) + " km for this fill")
print("break-even fill at this distance : " + str(litres_needed_to_break_even_at_this_distance) + " litres, " + str(more_than_the_tank_holds_by_litres) + " more than the tank holds")
print("")
print("the cheaper-pump reasoning")
print(" prices : " + str(home_price_cents_per_litre) + " and " + str(far_price_cents_per_litre) + ", read off the pumps")
print(" fill : " + str(litres_bought) + " litres, really bought")
print(" arithmetic : " + str(price_gap_cents_per_litre) + " cents times " + str(litres_bought) + " is " + str(saving_at_the_pump_cents) + " cents")
print(" intent : spend less on fuel")
print(" facts wrong : 0")
print(" verdict : THE FAR PUMP SAVES " + str(saving_at_the_pump_cents) + " CENTS A FILL")
print("")
print(" reading both pump prices is the part done right here, and it")
print(" is why the " + str(saving_at_the_pump_cents) + " cents at the pump are exactly right")
print("")
print("the price of getting there")
print(" what the saving scales with : the litres bought, " + str(litres_bought))
print(" what the trip costs : the kilometres driven, " + str(round_trip_km) + ", whatever")
print(" is bought at the end")
print(" fuel burnt on the way : " + str(fuel_for_the_trip_tenths_of_a_litre) + " tenths of a litre, " + str(fuel_for_the_trip_cents) + " cents")
print(" the balance : a saving of " + str(saving_at_the_pump_cents) + " against a cost of " + str(fuel_for_the_trip_cents))
print(" when the trip pays : when the round trip is under " + str(break_even_round_trip_km) + " km, or")
print(" the fill over " + str(litres_needed_to_break_even_at_this_distance) + " litres")
print("")
print("the fuel budget")
print(" believed : " + str(saving_at_the_pump_cents) + " cents saved every fill")
print(" actual : " + str(loss_on_the_trip_cents) + " cents lost every fill, before counting the hour")
print(" is either price wrong : no")
print(" is a lower price a saving : only after the cost of reaching")
print(" it is paid")
print("")
nc_saving_at_the_pump_cents = 200
nc_fuel_burnt_getting_there_and_back_cents = 560
nc_loss_the_trip_turns_it_into_cents = 360
print("null control - count the trip")
print(" saving at the pump : " + str(nc_saving_at_the_pump_cents) + " cents")
print(" fuel burnt getting there and back : " + str(nc_fuel_burnt_getting_there_and_back_cents) + " cents")
print(" loss the trip turns it into : " + str(nc_loss_the_trip_turns_it_into_cents) + " cents")
print(" no pump and no price changed; the fixed cost of reaching the")
print(" lower price was set against the saving it buys")
print("")
print("what a lower pump price guarantees")
print(" each litre bought there costs " + str(price_gap_cents_per_litre) + " cents less : exactly")
print(" filling up there saves money : not addressed; the " + str(round_trip_km) + " km trip")
print(" burns " + str(fuel_for_the_trip_tenths_of_a_litre) + " tenths of a litre, " + str(fuel_for_the_trip_cents) + " cents, against a saving of " + str(saving_at_the_pump_cents) + ";")
print(" the break-even is a " + str(break_even_round_trip_km) + " km round trip, or a " + str(litres_needed_to_break_even_at_this_distance) + "-litre fill")
print("")
print("a saving per unit is multiplied by the units, and a cost of getting there is")
print("not; the small saving has to be bought in bulk before it can pay for the road")
print("")
print("The far pump is " + str(price_gap_cents_per_litre) + " cents a litre cheaper and the " + str(litres_bought) + " litres save " + str(saving_at_the_pump_cents) + " cents - all")
print("true. But the " + str(round_trip_km) + " km there and back burn " + str(fuel_for_the_trip_cents) + " cents of fuel, so each fill loses")
print("" + str(loss_on_the_trip_cents) + ", and the trip would pay only under " + str(break_even_round_trip_km) + " km or over " + str(litres_needed_to_break_even_at_this_distance) + " litres, until the cost of")
print("reaching the price is set against the saving it buys.")stdout (executed)
texthome pump : 180 cents a litre
far pump : 175 cents a litre, 20 km away
fill : 40 litres, saving 200 cents at the pump
the trip : 40 km there and back at 8 litres per 100 km
fuel for the trip : 32 tenths of a litre, 560 cents
loss on the trip : 360 cents
driving cost : 140 tenths of a cent per km
break-even round trip : 14 km for this fill
break-even fill at this distance : 112 litres, 62 more than the tank holds
the cheaper-pump reasoning
prices : 180 and 175, read off the pumps
fill : 40 litres, really bought
arithmetic : 5 cents times 40 is 200 cents
intent : spend less on fuel
facts wrong : 0
verdict : THE FAR PUMP SAVES 200 CENTS A FILL
reading both pump prices is the part done right here, and it
is why the 200 cents at the pump are exactly right
the price of getting there
what the saving scales with : the litres bought, 40
what the trip costs : the kilometres driven, 40, whatever
is bought at the end
fuel burnt on the way : 32 tenths of a litre, 560 cents
the balance : a saving of 200 against a cost of 560
when the trip pays : when the round trip is under 14 km, or
the fill over 112 litres
the fuel budget
believed : 200 cents saved every fill
actual : 360 cents lost every fill, before counting the hour
is either price wrong : no
is a lower price a saving : only after the cost of reaching
it is paid
null control - count the trip
saving at the pump : 200 cents
fuel burnt getting there and back : 560 cents
loss the trip turns it into : 360 cents
no pump and no price changed; the fixed cost of reaching the
lower price was set against the saving it buys
what a lower pump price guarantees
each litre bought there costs 5 cents less : exactly
filling up there saves money : not addressed; the 40 km trip
burns 32 tenths of a litre, 560 cents, against a saving of 200;
the break-even is a 14 km round trip, or a 112-litre fill
a saving per unit is multiplied by the units, and a cost of getting there is
not; the small saving has to be bought in bulk before it can pay for the road
The far pump is 5 cents a litre cheaper and the 40 litres save 200 cents - all
true. But the 40 km there and back burn 560 cents of fuel, so each fill loses
360, and the trip would pay only under 14 km or over 112 litres, until the cost of
reaching the price is set against the saving it buys.Trace event types
eml:run:starteml:assigneml:outputeml:run:done