Function version of temperature converter