I was trying to normalize a set of numbers from -100 to 0 to a range of 10-100 and was having problems only to notice that even with no variables at all, this does not evalu
Make at least one of them float, then it will be float division, not integer:
>>> (20.0-10) / (100-10) 0.1111111111111111
Casting the result to float is too late.