Why operations on float variable are performed on a double? STM32F401RE, MDK-ARM v5
I'm assuming that temperature[1] is an integer type of some sort.
The subexpression (temperature[1] &gt;&gt; 5)*0.125 contains an operand 0.125 of type double, resulting in promotion throughout the whole expression. Try changing 0.125 to 0.125f, so that no promotion to double occurs.