# Make Quantity behave reasonable with Degrees Celsius

When using a Quantity with the unit of "DegreesCelsius" multiplication doesn't work as expected. If you have 10 degrees and multiply it by 2 you get 20 degrees instead of the expected 293,15 degrees. This becomes a real problem if you use the temperature directly in a formula, eg. the ideal gas law. Example code:

t = Quantity[10, "DegreesCelsius"];
T = UnitConvert@t;
UnitConvert[2 * t] // N (* => 293.15 K *)
2 * T // N (* => 566.3 K *)


Is there a way to fix this behaviour to work as I expect it to?

-
What you are getting is correct. The operations you are doing are not orderless -- order matters. – m_goldberg Feb 20 '14 at 1:50
How does UnitConvert know I didn't want the increment and return 20K? – george2079 Feb 20 '14 at 2:59
@george2079 UnitConvert in this case behaves like f[x_]:=x+273.15 so the two problems look like f[2*10] = 20 + 273.15 = 293.15 and 2*f[10] = 2(10 + 273.15) = 566.3. – bobthechemist Feb 20 '14 at 3:41
From my point of view, there is no meaning in "double the temperature". – Jason Feb 20 '14 at 7:33

I hope the new FormulaData takes this into account – Rojo Mar 2 '14 at 23:54