Case 995
The gas law was applied in celsius
the_gas_law_was_applied_in_celsius.eml - An operator watches the absolute pressure gauge on a sealed gas vessel climb from 200 kPa at 20 degrees Celsius to 300 kPa. Knowing that the pressure of a sealed gas is proportional to its temperature, the operator reasons that pressure up by half means temperature up by half - from 20 to 30 degrees, warm but safe. The gas really reached a temperature computed below.
ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-24
EML
eml# Self-authored for the EML case corpus (no external origin). An operator watches
# the absolute pressure gauge on a sealed gas vessel climb from 200 kPa at 20
# degrees Celsius to 300 kPa. Knowing that the pressure of a sealed gas is
# proportional to its temperature, the operator reasons that pressure up by half
# means temperature up by half - from 20 to 30 degrees, warm but safe. The gas
# really reached a temperature computed below.
#
# The reasoning is careful. The gauge reads absolute pressure and is accurate;
# the vessel really is sealed, so the amount of gas and its volume are fixed;
# for such a gas pressure really is proportional to temperature; and the intent
# is exactly 'how hot is the gas'.
#
# The proportion holds only for temperature counted from absolute zero, 273.15
# degrees below the Celsius zero. 20 degrees Celsius is 293.15 on that scale;
# half as much again is 439.72, which is 166.57 degrees Celsius. The gas is 136
# degrees hotter than the operator believes.
200 => pressure_before_kpa
300 => pressure_now_kpa
2000 => temperature_before_hundredths_c
27315 => zero_celsius_above_absolute_zero_hundredths
int(temperature_before_hundredths_c / 100) => temperature_before_c
int(temperature_before_hundredths_c * pressure_now_kpa / pressure_before_kpa) => temperature_now_by_celsius_ratio_hundredths_c
temperature_before_hundredths_c + zero_celsius_above_absolute_zero_hundredths => temperature_before_hundredths_k
int(temperature_before_hundredths_k * pressure_now_kpa / pressure_before_kpa) => temperature_now_hundredths_k
temperature_now_hundredths_k - zero_celsius_above_absolute_zero_hundredths => temperature_now_hundredths_c
int(temperature_now_by_celsius_ratio_hundredths_c / 100) => temperature_believed_c
int(temperature_now_hundredths_c / 100) => temperature_actual_c
temperature_actual_c - temperature_believed_c => hotter_than_believed_by_c
int((pressure_now_kpa - pressure_before_kpa) * 100 / pressure_before_kpa) => pressure_rise_percent
"pressure : " + str(pressure_before_kpa) + " kPa, now " + str(pressure_now_kpa) + " kPa, up " + str(pressure_rise_percent) + " percent" ^0
"temperature before : " + str(temperature_before_hundredths_c) + " hundredths of a degree C" ^0
"celsius zero above absolute zero : " + str(zero_celsius_above_absolute_zero_hundredths) + " hundredths of a degree" ^0
"" ^0
"now, by a celsius ratio : " + str(temperature_now_by_celsius_ratio_hundredths_c) + " hundredths of a degree C" ^0
"before, from absolute zero : " + str(temperature_before_hundredths_k) + " hundredths of a kelvin" ^0
"now, from absolute zero : " + str(temperature_now_hundredths_k) + " hundredths of a kelvin" ^0
"now, in celsius : " + str(temperature_now_hundredths_c) + " hundredths of a degree C" ^0
"" ^0
"believed : " + str(temperature_believed_c) + " C" ^0
"actual : " + str(temperature_actual_c) + " C" ^0
"hotter than believed by : " + str(hotter_than_believed_by_c) + " degrees" ^0
"" ^0
# ---- what the operator verified ----
"the up-by-half reasoning" ^0
" gauge : absolute pressure, accurate" ^0
" vessel : sealed, so the gas and its volume are fixed" ^0
" law : pressure proportional to temperature" ^0
" intent : how hot is the gas" ^0
" facts wrong : 0" ^0
" verdict : THE GAS IS AT " + str(temperature_believed_c) + " DEGREES, WARM BUT SAFE" ^0
"" ^0
" reading an absolute gauge on a sealed vessel is the part done" ^0
" right here, and it is why the pressure ratio of " + str(pressure_now_kpa) + " to " + str(pressure_before_kpa) ^0
" really does equal the temperature ratio" ^0
"" ^0
# ---- where the proportion starts ----
"a ratio needs a true zero" ^0
" what the law is proportional to : temperature counted from" ^0
" absolute zero, where a gas would press on nothing" ^0
" where celsius starts : " + str(zero_celsius_above_absolute_zero_hundredths) + " hundredths of a degree above that" ^0
" " + str(temperature_before_hundredths_c) + " hundredths of a degree C : " + str(temperature_before_hundredths_k) + " from absolute zero" ^0
" up by half : " + str(temperature_now_hundredths_k) + ", which is " + str(temperature_now_hundredths_c) + " hundredths of a degree C" ^0
" what the celsius ratio did : scaled the distance from an ice" ^0
" point that the gas knows nothing about" ^0
"" ^0
# ---- what the operator got ----
"the vessel" ^0
" believed : " + str(temperature_believed_c) + " C" ^0
" actual : " + str(temperature_actual_c) + " C" ^0
" is the gas law wrong : no; the pressure did rise with the" ^0
" temperature, exactly in proportion" ^0
" is celsius a scale you can take ratios on : no; its zero is" ^0
" a convention, not an absence" ^0
"" ^0
# ---- null control ----
# The same reading converted through the absolute scale instead of scaled in
# celsius.
30 => nc_temperature_read_with_a_celsius_ratio_c
166 => nc_temperature_read_with_an_absolute_ratio_c
136 => nc_degrees_the_true_zero_adds
"null control - take the ratio from absolute zero" ^0
" temperature, read with a celsius ratio : " + str(nc_temperature_read_with_a_celsius_ratio_c) + " C" ^0
" temperature, read with an absolute ratio : " + str(nc_temperature_read_with_an_absolute_ratio_c) + " C" ^0
" degrees the true zero adds : " + str(nc_degrees_the_true_zero_adds) ^0
" no gauge and no gas changed; the proportion was applied to the" ^0
" quantity it is a proportion of" ^0
"" ^0
# ---- the rule ----
"what an accurate gauge and the gas law guarantee" ^0
" the temperature rose in proportion to the pressure : exactly" ^0
" the gas went from " + str(temperature_before_c) + " to " + str(temperature_believed_c) + " degrees C : not addressed; the" ^0
" proportion runs from absolute zero, and " + str(temperature_before_hundredths_k) + " hundredths of" ^0
" a kelvin up by half is " + str(temperature_actual_c) + " degrees C, " + str(hotter_than_believed_by_c) + " hotter than believed" ^0
"" ^0
"a ratio is only as honest as the zero it is counted from; move the zero and" ^0
"half as much again becomes a different half" ^0
"" ^0
"The pressure rose by half and the temperature did too - on the absolute scale." ^0
"In celsius the vessel went from " + str(temperature_before_c) + " to " + str(temperature_actual_c) + " degrees, not to " + str(temperature_believed_c) + ", because" ^0
"the proportion is counted from absolute zero, " + str(zero_celsius_above_absolute_zero_hundredths) + " hundredths of a degree below" ^0
"the celsius zero, until the ratio is taken on the scale the law is written in." ^0Python (deterministic transpilation)
pythonpressure_before_kpa = 200
pressure_now_kpa = 300
temperature_before_hundredths_c = 2000
zero_celsius_above_absolute_zero_hundredths = 27315
temperature_before_c = int(temperature_before_hundredths_c / 100)
temperature_now_by_celsius_ratio_hundredths_c = int(temperature_before_hundredths_c * pressure_now_kpa / pressure_before_kpa)
temperature_before_hundredths_k = temperature_before_hundredths_c + zero_celsius_above_absolute_zero_hundredths
temperature_now_hundredths_k = int(temperature_before_hundredths_k * pressure_now_kpa / pressure_before_kpa)
temperature_now_hundredths_c = temperature_now_hundredths_k - zero_celsius_above_absolute_zero_hundredths
temperature_believed_c = int(temperature_now_by_celsius_ratio_hundredths_c / 100)
temperature_actual_c = int(temperature_now_hundredths_c / 100)
hotter_than_believed_by_c = temperature_actual_c - temperature_believed_c
pressure_rise_percent = int((pressure_now_kpa - pressure_before_kpa) * 100 / pressure_before_kpa)
print("pressure : " + str(pressure_before_kpa) + " kPa, now " + str(pressure_now_kpa) + " kPa, up " + str(pressure_rise_percent) + " percent")
print("temperature before : " + str(temperature_before_hundredths_c) + " hundredths of a degree C")
print("celsius zero above absolute zero : " + str(zero_celsius_above_absolute_zero_hundredths) + " hundredths of a degree")
print("")
print("now, by a celsius ratio : " + str(temperature_now_by_celsius_ratio_hundredths_c) + " hundredths of a degree C")
print("before, from absolute zero : " + str(temperature_before_hundredths_k) + " hundredths of a kelvin")
print("now, from absolute zero : " + str(temperature_now_hundredths_k) + " hundredths of a kelvin")
print("now, in celsius : " + str(temperature_now_hundredths_c) + " hundredths of a degree C")
print("")
print("believed : " + str(temperature_believed_c) + " C")
print("actual : " + str(temperature_actual_c) + " C")
print("hotter than believed by : " + str(hotter_than_believed_by_c) + " degrees")
print("")
print("the up-by-half reasoning")
print(" gauge : absolute pressure, accurate")
print(" vessel : sealed, so the gas and its volume are fixed")
print(" law : pressure proportional to temperature")
print(" intent : how hot is the gas")
print(" facts wrong : 0")
print(" verdict : THE GAS IS AT " + str(temperature_believed_c) + " DEGREES, WARM BUT SAFE")
print("")
print(" reading an absolute gauge on a sealed vessel is the part done")
print(" right here, and it is why the pressure ratio of " + str(pressure_now_kpa) + " to " + str(pressure_before_kpa))
print(" really does equal the temperature ratio")
print("")
print("a ratio needs a true zero")
print(" what the law is proportional to : temperature counted from")
print(" absolute zero, where a gas would press on nothing")
print(" where celsius starts : " + str(zero_celsius_above_absolute_zero_hundredths) + " hundredths of a degree above that")
print(" " + str(temperature_before_hundredths_c) + " hundredths of a degree C : " + str(temperature_before_hundredths_k) + " from absolute zero")
print(" up by half : " + str(temperature_now_hundredths_k) + ", which is " + str(temperature_now_hundredths_c) + " hundredths of a degree C")
print(" what the celsius ratio did : scaled the distance from an ice")
print(" point that the gas knows nothing about")
print("")
print("the vessel")
print(" believed : " + str(temperature_believed_c) + " C")
print(" actual : " + str(temperature_actual_c) + " C")
print(" is the gas law wrong : no; the pressure did rise with the")
print(" temperature, exactly in proportion")
print(" is celsius a scale you can take ratios on : no; its zero is")
print(" a convention, not an absence")
print("")
nc_temperature_read_with_a_celsius_ratio_c = 30
nc_temperature_read_with_an_absolute_ratio_c = 166
nc_degrees_the_true_zero_adds = 136
print("null control - take the ratio from absolute zero")
print(" temperature, read with a celsius ratio : " + str(nc_temperature_read_with_a_celsius_ratio_c) + " C")
print(" temperature, read with an absolute ratio : " + str(nc_temperature_read_with_an_absolute_ratio_c) + " C")
print(" degrees the true zero adds : " + str(nc_degrees_the_true_zero_adds))
print(" no gauge and no gas changed; the proportion was applied to the")
print(" quantity it is a proportion of")
print("")
print("what an accurate gauge and the gas law guarantee")
print(" the temperature rose in proportion to the pressure : exactly")
print(" the gas went from " + str(temperature_before_c) + " to " + str(temperature_believed_c) + " degrees C : not addressed; the")
print(" proportion runs from absolute zero, and " + str(temperature_before_hundredths_k) + " hundredths of")
print(" a kelvin up by half is " + str(temperature_actual_c) + " degrees C, " + str(hotter_than_believed_by_c) + " hotter than believed")
print("")
print("a ratio is only as honest as the zero it is counted from; move the zero and")
print("half as much again becomes a different half")
print("")
print("The pressure rose by half and the temperature did too - on the absolute scale.")
print("In celsius the vessel went from " + str(temperature_before_c) + " to " + str(temperature_actual_c) + " degrees, not to " + str(temperature_believed_c) + ", because")
print("the proportion is counted from absolute zero, " + str(zero_celsius_above_absolute_zero_hundredths) + " hundredths of a degree below")
print("the celsius zero, until the ratio is taken on the scale the law is written in.")stdout (executed)
textpressure : 200 kPa, now 300 kPa, up 50 percent
temperature before : 2000 hundredths of a degree C
celsius zero above absolute zero : 27315 hundredths of a degree
now, by a celsius ratio : 3000 hundredths of a degree C
before, from absolute zero : 29315 hundredths of a kelvin
now, from absolute zero : 43972 hundredths of a kelvin
now, in celsius : 16657 hundredths of a degree C
believed : 30 C
actual : 166 C
hotter than believed by : 136 degrees
the up-by-half reasoning
gauge : absolute pressure, accurate
vessel : sealed, so the gas and its volume are fixed
law : pressure proportional to temperature
intent : how hot is the gas
facts wrong : 0
verdict : THE GAS IS AT 30 DEGREES, WARM BUT SAFE
reading an absolute gauge on a sealed vessel is the part done
right here, and it is why the pressure ratio of 300 to 200
really does equal the temperature ratio
a ratio needs a true zero
what the law is proportional to : temperature counted from
absolute zero, where a gas would press on nothing
where celsius starts : 27315 hundredths of a degree above that
2000 hundredths of a degree C : 29315 from absolute zero
up by half : 43972, which is 16657 hundredths of a degree C
what the celsius ratio did : scaled the distance from an ice
point that the gas knows nothing about
the vessel
believed : 30 C
actual : 166 C
is the gas law wrong : no; the pressure did rise with the
temperature, exactly in proportion
is celsius a scale you can take ratios on : no; its zero is
a convention, not an absence
null control - take the ratio from absolute zero
temperature, read with a celsius ratio : 30 C
temperature, read with an absolute ratio : 166 C
degrees the true zero adds : 136
no gauge and no gas changed; the proportion was applied to the
quantity it is a proportion of
what an accurate gauge and the gas law guarantee
the temperature rose in proportion to the pressure : exactly
the gas went from 20 to 30 degrees C : not addressed; the
proportion runs from absolute zero, and 29315 hundredths of
a kelvin up by half is 166 degrees C, 136 hotter than believed
a ratio is only as honest as the zero it is counted from; move the zero and
half as much again becomes a different half
The pressure rose by half and the temperature did too - on the absolute scale.
In celsius the vessel went from 20 to 166 degrees, not to 30, because
the proportion is counted from absolute zero, 27315 hundredths of a degree below
the celsius zero, until the ratio is taken on the scale the law is written in.Trace event types
eml:run:starteml:assigneml:outputeml:run:done