OK, I understand. The approach works even better if you multiply by 10:
int16_t celsius2fahrenheit10(int16_t c)
{
int16_t f = 0;
f += c << 4;
f -= c;
f -= c >> 1;
f -= c >> 3;
f += c >> 5;
f += 320 * 8;
f >>= 3;
return f;
}
This is really accurate: C=0 (int 0) F=32 (int: 320, exact: 32)
C=15.3 (int 153) F=59.5 (int: 595, exact: 59.54)
C=37 (int 370) F=98.6 (int: 986, exact: 98.6)
C=100 (int 1000) F=212 (int: 2120, exact: 212)