<!-- canonical: efficientnewlanguage.org/ai/examples/959-the-heater-was-a-hundred-percent-efficient-and-lost | ai_layer_version: 0.1.0 | updated: 2026-09-22 -->

# Example 959 — The heater was a hundred percent efficient and lost

`the_heater_was_a_hundred_percent_efficient_and_lost.eml` - A buyer chooses an electric resistance heater over a heat pump because the heater is rated one hundred percent efficient and nothing can beat one hundred percent, the rating is true, and the heat pump next door delivers three times the heat for the same electricity. What efficiency measures, and what it does not, is computed below.

## EML

```eml
# Self-authored for the EML case corpus (no external origin). A buyer chooses
# an electric resistance heater over a heat pump because the heater is rated
# one hundred percent efficient and nothing can beat one hundred percent, the
# rating is true, and the heat pump next door delivers three times the heat
# for the same electricity. What efficiency measures, and what it does not, is
# computed below.
#
# The reasoning is careful. The heater really does turn every joule of
# electricity into heat; no converter can exceed one hundred percent; the heat
# pump's plate said 'coefficient 3', which sounded like marketing; and the
# intent was exactly 'the most heat per unit of electricity'.
#
# Efficiency caps at one hundred percent for CONVERTING electricity into heat,
# but a heat pump does not convert, it MOVES heat from outdoors with a little
# electricity - so one kilowatt-hour of electricity delivers three of heat, the
# heater's perfect score is the floor of the comparison, and per kilowatt-hour
# of warmth the heater costs three times as much.

100 => resistance_heater_efficiency_percent
3 => heat_pump_coefficient_of_performance
30 => electricity_cents_per_kwh
10 => gas_cents_per_kwh
90 => gas_boiler_efficiency_percent
10000 => heat_needed_kwh_per_year

int(electricity_cents_per_kwh * 100 / resistance_heater_efficiency_percent) => resistance_heater_cents_per_kwh_of_heat
int(electricity_cents_per_kwh / heat_pump_coefficient_of_performance) => heat_pump_cents_per_kwh_of_heat
int(gas_cents_per_kwh * 100 / gas_boiler_efficiency_percent) => gas_boiler_cents_per_kwh_of_heat
heat_pump_coefficient_of_performance * 100 => heat_pump_output_as_a_share_of_its_input_percent
heat_pump_coefficient_of_performance - 1 => units_of_heat_moved_from_outdoors_per_unit_of_electricity
int(heat_needed_kwh_per_year * resistance_heater_cents_per_kwh_of_heat / 100) => resistance_heater_cost_per_year
int(heat_needed_kwh_per_year * heat_pump_cents_per_kwh_of_heat / 100) => heat_pump_cost_per_year
int(heat_needed_kwh_per_year * gas_boiler_cents_per_kwh_of_heat / 100) => gas_boiler_cost_per_year
resistance_heater_cost_per_year - heat_pump_cost_per_year => yearly_cost_the_perfect_efficiency_loses
int(heat_needed_kwh_per_year / heat_pump_coefficient_of_performance) => electricity_the_heat_pump_draws_kwh_per_year
heat_needed_kwh_per_year - electricity_the_heat_pump_draws_kwh_per_year => heat_moved_in_from_outdoors_kwh_per_year

"resistance heater               : " + str(resistance_heater_efficiency_percent) + " percent efficient, " + str(resistance_heater_cents_per_kwh_of_heat) + " cents per kWh of heat" ^0
"heat pump                       : coefficient " + str(heat_pump_coefficient_of_performance) + ", output " + str(heat_pump_output_as_a_share_of_its_input_percent) + " percent of input, " + str(heat_pump_cents_per_kwh_of_heat) + " cents per kWh of heat" ^0
"gas boiler, for comparison      : " + str(gas_boiler_efficiency_percent) + " percent efficient at " + str(gas_cents_per_kwh) + " cents per kWh of gas, " + str(gas_boiler_cents_per_kwh_of_heat) + " cents per kWh of heat" ^0
"" ^0
"heat needed per year            : " + str(heat_needed_kwh_per_year) + " kWh" ^0
"resistance heater per year      : " + str(resistance_heater_cost_per_year) ^0
"heat pump per year              : " + str(heat_pump_cost_per_year) + ", drawing " + str(electricity_the_heat_pump_draws_kwh_per_year) + " kWh of electricity and moving " + str(heat_moved_in_from_outdoors_kwh_per_year) + " kWh in from outdoors" ^0
"gas boiler per year             : " + str(gas_boiler_cost_per_year) ^0
"perfect efficiency loses        : " + str(yearly_cost_the_perfect_efficiency_loses) + " a year to the heat pump" ^0
"" ^0

# ---- what the buyer verified ----

"the nothing-beats-a-hundred reasoning" ^0
"  heater rating : " + str(resistance_heater_efficiency_percent) + " percent, true" ^0
"  physics : no converter exceeds a hundred percent, true" ^0
"  heat pump plate : 'coefficient " + str(heat_pump_coefficient_of_performance) + "', read as marketing" ^0
"  intent : the most heat per unit of electricity" ^0
"  facts wrong : 0" ^0
"  verdict : A HUNDRED PERCENT CANNOT BE BEATEN" ^0
"" ^0
"  knowing that conversion cannot exceed a hundred percent is" ^0
"  the part done right here, and it is why the resistance" ^0
"  heater really is the best possible CONVERTER" ^0
"" ^0

# ---- what efficiency measures ----

"converting versus moving" ^0
"  what the heater does : turns electricity into heat, all of it" ^0
"  what the heat pump does : uses electricity to carry heat that" ^0
"    already exists outdoors into the house" ^0
"  per unit of electricity : the heater makes 1 unit of heat; the" ^0
"    pump delivers " + str(heat_pump_coefficient_of_performance) + ", of which " + str(units_of_heat_moved_from_outdoors_per_unit_of_electricity) + " were outdoors a moment ago" ^0
"  why " + str(heat_pump_output_as_a_share_of_its_input_percent) + " percent breaks no law : the input counted is the" ^0
"    electricity, not the outdoor heat that came along with it" ^0
"  what the comparison should be : cents per kWh of warmth in" ^0
"    the room, " + str(resistance_heater_cents_per_kwh_of_heat) + " against " + str(heat_pump_cents_per_kwh_of_heat) ^0
"" ^0

# ---- what the buyer got ----

"the bill" ^0
"  believed : the best possible heat per unit of electricity" ^0
"  actual : a third of the heat pump's, " + str(yearly_cost_the_perfect_efficiency_loses) + " a year dearer" ^0
"  is the heater's rating false : no; it converts perfectly" ^0
"  is conversion the whole question : no; moving heat is not" ^0
"    converting it, and the pump moves " + str(heat_moved_in_from_outdoors_kwh_per_year) + " kWh a year for free" ^0
"" ^0

# ---- null control ----

# The same choice made on cents per kilowatt-hour of delivered heat instead of
# on the efficiency percentage.
30 => nc_cost_per_kwh_of_heat_by_choosing_the_top_efficiency
10 => nc_cost_per_kwh_of_heat_by_choosing_the_lowest_cost_of_warmth
20 => nc_cents_per_kwh_the_right_measure_saves

"null control - compare cost per unit of warmth" ^0
"  cost per kWh of heat, choosing by efficiency : " + str(nc_cost_per_kwh_of_heat_by_choosing_the_top_efficiency) + " cents" ^0
"  cost per kWh of heat, choosing by cost of warmth : " + str(nc_cost_per_kwh_of_heat_by_choosing_the_lowest_cost_of_warmth) + " cents" ^0
"  cents per kWh the right measure saves : " + str(nc_cents_per_kwh_the_right_measure_saves) ^0
"  no appliance changed; the figure compared was the one the" ^0
"  bill is written in" ^0
"" ^0

# ---- the rule ----

"what a hundred-percent efficiency rating guarantees" ^0
"  every unit of electricity becomes heat : exactly" ^0
"  no appliance gives more heat per unit of electricity : not addressed;" ^0
"    efficiency bounds conversion, a heat pump moves heat instead," ^0
"    and delivers " + str(heat_pump_coefficient_of_performance) + " kWh of warmth per kWh bought, so the perfect" ^0
"    converter costs " + str(resistance_heater_cents_per_kwh_of_heat) + " cents per kWh of warmth against " + str(heat_pump_cents_per_kwh_of_heat) ^0
"" ^0

"a perfect score on the wrong test is still the wrong test; the heater wins" ^0
"at turning electricity into heat and loses at heating the house, because" ^0
"most of the house's heat did not have to be made at all" ^0
"" ^0

"The heater is " + str(resistance_heater_efficiency_percent) + " percent efficient and nothing converts better - both true. But a" ^0
"heat pump moves heat rather than making it: " + str(heat_pump_coefficient_of_performance) + " kWh of warmth per kWh of electricity," ^0
"" + str(heat_pump_cents_per_kwh_of_heat) + " cents per kWh against the heater's " + str(resistance_heater_cents_per_kwh_of_heat) + ", " + str(yearly_cost_the_perfect_efficiency_loses) + " a year on " + str(heat_needed_kwh_per_year) + " kWh, until the" ^0
"comparison is made in cost per unit of warmth and not in the efficiency of conversion." ^0
```

## Python (deterministic transpilation)

```python
resistance_heater_efficiency_percent = 100
heat_pump_coefficient_of_performance = 3
electricity_cents_per_kwh = 30
gas_cents_per_kwh = 10
gas_boiler_efficiency_percent = 90
heat_needed_kwh_per_year = 10000
resistance_heater_cents_per_kwh_of_heat = int(electricity_cents_per_kwh * 100 / resistance_heater_efficiency_percent)
heat_pump_cents_per_kwh_of_heat = int(electricity_cents_per_kwh / heat_pump_coefficient_of_performance)
gas_boiler_cents_per_kwh_of_heat = int(gas_cents_per_kwh * 100 / gas_boiler_efficiency_percent)
heat_pump_output_as_a_share_of_its_input_percent = heat_pump_coefficient_of_performance * 100
units_of_heat_moved_from_outdoors_per_unit_of_electricity = heat_pump_coefficient_of_performance - 1
resistance_heater_cost_per_year = int(heat_needed_kwh_per_year * resistance_heater_cents_per_kwh_of_heat / 100)
heat_pump_cost_per_year = int(heat_needed_kwh_per_year * heat_pump_cents_per_kwh_of_heat / 100)
gas_boiler_cost_per_year = int(heat_needed_kwh_per_year * gas_boiler_cents_per_kwh_of_heat / 100)
yearly_cost_the_perfect_efficiency_loses = resistance_heater_cost_per_year - heat_pump_cost_per_year
electricity_the_heat_pump_draws_kwh_per_year = int(heat_needed_kwh_per_year / heat_pump_coefficient_of_performance)
heat_moved_in_from_outdoors_kwh_per_year = heat_needed_kwh_per_year - electricity_the_heat_pump_draws_kwh_per_year
print("resistance heater               : " + str(resistance_heater_efficiency_percent) + " percent efficient, " + str(resistance_heater_cents_per_kwh_of_heat) + " cents per kWh of heat")
print("heat pump                       : coefficient " + str(heat_pump_coefficient_of_performance) + ", output " + str(heat_pump_output_as_a_share_of_its_input_percent) + " percent of input, " + str(heat_pump_cents_per_kwh_of_heat) + " cents per kWh of heat")
print("gas boiler, for comparison      : " + str(gas_boiler_efficiency_percent) + " percent efficient at " + str(gas_cents_per_kwh) + " cents per kWh of gas, " + str(gas_boiler_cents_per_kwh_of_heat) + " cents per kWh of heat")
print("")
print("heat needed per year            : " + str(heat_needed_kwh_per_year) + " kWh")
print("resistance heater per year      : " + str(resistance_heater_cost_per_year))
print("heat pump per year              : " + str(heat_pump_cost_per_year) + ", drawing " + str(electricity_the_heat_pump_draws_kwh_per_year) + " kWh of electricity and moving " + str(heat_moved_in_from_outdoors_kwh_per_year) + " kWh in from outdoors")
print("gas boiler per year             : " + str(gas_boiler_cost_per_year))
print("perfect efficiency loses        : " + str(yearly_cost_the_perfect_efficiency_loses) + " a year to the heat pump")
print("")
print("the nothing-beats-a-hundred reasoning")
print("  heater rating : " + str(resistance_heater_efficiency_percent) + " percent, true")
print("  physics : no converter exceeds a hundred percent, true")
print("  heat pump plate : 'coefficient " + str(heat_pump_coefficient_of_performance) + "', read as marketing")
print("  intent : the most heat per unit of electricity")
print("  facts wrong : 0")
print("  verdict : A HUNDRED PERCENT CANNOT BE BEATEN")
print("")
print("  knowing that conversion cannot exceed a hundred percent is")
print("  the part done right here, and it is why the resistance")
print("  heater really is the best possible CONVERTER")
print("")
print("converting versus moving")
print("  what the heater does : turns electricity into heat, all of it")
print("  what the heat pump does : uses electricity to carry heat that")
print("    already exists outdoors into the house")
print("  per unit of electricity : the heater makes 1 unit of heat; the")
print("    pump delivers " + str(heat_pump_coefficient_of_performance) + ", of which " + str(units_of_heat_moved_from_outdoors_per_unit_of_electricity) + " were outdoors a moment ago")
print("  why " + str(heat_pump_output_as_a_share_of_its_input_percent) + " percent breaks no law : the input counted is the")
print("    electricity, not the outdoor heat that came along with it")
print("  what the comparison should be : cents per kWh of warmth in")
print("    the room, " + str(resistance_heater_cents_per_kwh_of_heat) + " against " + str(heat_pump_cents_per_kwh_of_heat))
print("")
print("the bill")
print("  believed : the best possible heat per unit of electricity")
print("  actual : a third of the heat pump's, " + str(yearly_cost_the_perfect_efficiency_loses) + " a year dearer")
print("  is the heater's rating false : no; it converts perfectly")
print("  is conversion the whole question : no; moving heat is not")
print("    converting it, and the pump moves " + str(heat_moved_in_from_outdoors_kwh_per_year) + " kWh a year for free")
print("")
nc_cost_per_kwh_of_heat_by_choosing_the_top_efficiency = 30
nc_cost_per_kwh_of_heat_by_choosing_the_lowest_cost_of_warmth = 10
nc_cents_per_kwh_the_right_measure_saves = 20
print("null control - compare cost per unit of warmth")
print("  cost per kWh of heat, choosing by efficiency : " + str(nc_cost_per_kwh_of_heat_by_choosing_the_top_efficiency) + " cents")
print("  cost per kWh of heat, choosing by cost of warmth : " + str(nc_cost_per_kwh_of_heat_by_choosing_the_lowest_cost_of_warmth) + " cents")
print("  cents per kWh the right measure saves : " + str(nc_cents_per_kwh_the_right_measure_saves))
print("  no appliance changed; the figure compared was the one the")
print("  bill is written in")
print("")
print("what a hundred-percent efficiency rating guarantees")
print("  every unit of electricity becomes heat : exactly")
print("  no appliance gives more heat per unit of electricity : not addressed;")
print("    efficiency bounds conversion, a heat pump moves heat instead,")
print("    and delivers " + str(heat_pump_coefficient_of_performance) + " kWh of warmth per kWh bought, so the perfect")
print("    converter costs " + str(resistance_heater_cents_per_kwh_of_heat) + " cents per kWh of warmth against " + str(heat_pump_cents_per_kwh_of_heat))
print("")
print("a perfect score on the wrong test is still the wrong test; the heater wins")
print("at turning electricity into heat and loses at heating the house, because")
print("most of the house's heat did not have to be made at all")
print("")
print("The heater is " + str(resistance_heater_efficiency_percent) + " percent efficient and nothing converts better - both true. But a")
print("heat pump moves heat rather than making it: " + str(heat_pump_coefficient_of_performance) + " kWh of warmth per kWh of electricity,")
print("" + str(heat_pump_cents_per_kwh_of_heat) + " cents per kWh against the heater's " + str(resistance_heater_cents_per_kwh_of_heat) + ", " + str(yearly_cost_the_perfect_efficiency_loses) + " a year on " + str(heat_needed_kwh_per_year) + " kWh, until the")
print("comparison is made in cost per unit of warmth and not in the efficiency of conversion.")
```

## stdout (executed)

```text
resistance heater               : 100 percent efficient, 30 cents per kWh of heat
heat pump                       : coefficient 3, output 300 percent of input, 10 cents per kWh of heat
gas boiler, for comparison      : 90 percent efficient at 10 cents per kWh of gas, 11 cents per kWh of heat

heat needed per year            : 10000 kWh
resistance heater per year      : 3000
heat pump per year              : 1000, drawing 3333 kWh of electricity and moving 6667 kWh in from outdoors
gas boiler per year             : 1100
perfect efficiency loses        : 2000 a year to the heat pump

the nothing-beats-a-hundred reasoning
  heater rating : 100 percent, true
  physics : no converter exceeds a hundred percent, true
  heat pump plate : 'coefficient 3', read as marketing
  intent : the most heat per unit of electricity
  facts wrong : 0
  verdict : A HUNDRED PERCENT CANNOT BE BEATEN

  knowing that conversion cannot exceed a hundred percent is
  the part done right here, and it is why the resistance
  heater really is the best possible CONVERTER

converting versus moving
  what the heater does : turns electricity into heat, all of it
  what the heat pump does : uses electricity to carry heat that
    already exists outdoors into the house
  per unit of electricity : the heater makes 1 unit of heat; the
    pump delivers 3, of which 2 were outdoors a moment ago
  why 300 percent breaks no law : the input counted is the
    electricity, not the outdoor heat that came along with it
  what the comparison should be : cents per kWh of warmth in
    the room, 30 against 10

the bill
  believed : the best possible heat per unit of electricity
  actual : a third of the heat pump's, 2000 a year dearer
  is the heater's rating false : no; it converts perfectly
  is conversion the whole question : no; moving heat is not
    converting it, and the pump moves 6667 kWh a year for free

null control - compare cost per unit of warmth
  cost per kWh of heat, choosing by efficiency : 30 cents
  cost per kWh of heat, choosing by cost of warmth : 10 cents
  cents per kWh the right measure saves : 20
  no appliance changed; the figure compared was the one the
  bill is written in

what a hundred-percent efficiency rating guarantees
  every unit of electricity becomes heat : exactly
  no appliance gives more heat per unit of electricity : not addressed;
    efficiency bounds conversion, a heat pump moves heat instead,
    and delivers 3 kWh of warmth per kWh bought, so the perfect
    converter costs 30 cents per kWh of warmth against 10

a perfect score on the wrong test is still the wrong test; the heater wins
at turning electricity into heat and loses at heating the house, because
most of the house's heat did not have to be made at all

The heater is 100 percent efficient and nothing converts better - both true. But a
heat pump moves heat rather than making it: 3 kWh of warmth per kWh of electricity,
10 cents per kWh against the heater's 30, 2000 a year on 10000 kWh, until the
comparison is made in cost per unit of warmth and not in the efficiency of conversion.
```

## Round-trip

`ok: true` — round-trip fixpoint reached (python1 == python2)

## Trace event types

eml:run:start · eml:assign · eml:output · eml:run:done
