To me it looks like you are operating on strings, that is either one of your variables like LMax_B1
etc. is a unicode string, or probably all of them are. You have to convert them to floating point numbers (or whatever they are) first, i.e. change:
LMax_B1 - LMin_B1
to
float(LMax_B1) - float(LMin_B1)
Do so likewise for all other variables. By the way, you don't need to import math for the operators + - * /
. They are always available and work as expected if you operate on numbers. Math is required for more advanced functions like sin
etc.