You haven't initialized tempValue in your tempS routine. It's a local so it will not be done for you. Set it to 0.0.
It may be worth changing the constants you're using with float values to be float too, e.g. 5.0, not 5.
Put some Serial.prints in to see what your intermediate values are.