Remy Porter at The Daily WTF dug into an open source home automation project that bridges mini-split heat pumps, which are typically controlled only by IR remotes, into household automation setups. Buried in the code he found a temperature helper built as a std::map lookup table instead of a formula.

Using float as a map key is already asking for rounding trouble, but the table itself is wrong. It maps 18.0C to 65F, when 18C is actually 64.4F. The table steps by 0.5C per 1F, which is not the real conversion factor, and it even skips 19.5C in an apparent attempt to correct the drift. The reverse table, Fahrenheit to Celsius, can be off by a full degree Celsius, a difference you can feel.

Porter first assumed this was a misguided optimization, doing lookups instead of arithmetic. Then he read the comment: the mappings come directly from the remote. When the remote's display says 72F, it actually transmits 22.5C to the unit.

His theory: the remote's microcontroller handles floating point poorly, so the manufacturer hard-coded a lookup table of good-enough approximations. Since few markets use Fahrenheit, close enough was deemed acceptable. His verdict: the WTF is neither the hobby project nor the remote, but the locales clinging to what he calls freedom units.