added functions ExpFactorNormalize and ExpFactor to deal with exponentiation with log-scaled factors