account for infinite power and fix math

checks for infinite LR power
accidently had - 1e36 which does basically nothing instead of *1e-36