Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can the expression $$\dfrac{\sum_{k = 0}^n e^{\large\beta_1 \left( t_k + 2 t_n \right)}} {\sum_{k = 0}^n e^{\large\beta_1 \left( t_k + t_n \right)}}\;\;\text{ where}\;t_i\ge0\;\text { and}\;\;\beta_1\ge0$$ be simplified to avoid overflow due to limited precision arithmetic? The sequence $t_k$ is strictly increasing, that is, $t_{k+1}>t_k$.

share|cite|improve this question
Maybe I'm drunk, but doesn't this simplify to $e^{\beta_1 t_n}$? – enzotib Jan 30 '13 at 22:11
up vote 2 down vote accepted

I would find the value of $k=k_m$ such that $\beta_1 (t_{k_m}+2 t_n)$ is a maximum, and factor out $\exp{[\beta_1 (t_{k_m}+2 t_n)]}$ from both numerator and denominator.

share|cite|improve this answer
Thanks! I forgot to mention that $t_i$ is strictly increasing so the maximum is always at $k=n$. – crow Jan 30 '13 at 21:49
Hurrah! Thanks @rlgordonma, the factorization worked and since the sequence is strictly increasing there is no need to find the maximum. The answer is given by $\frac{\sum_{k = 0}^n e^{\beta_1 \left( t_k + 2 t_n \right)}}{\sum_{k = 0}^n e^{\beta_1 \left( t_k + t_n \right)}} = \frac{\sum_{k = 0}^n \frac{e^{\beta_1 \left( t_k + 2 t_n \right)}}{e^{\beta_1 3 t_n}}}{\sum_{k = 0}^n \frac{e^{\beta_1 \left( t_k + t_n \right)}}{e^{\beta_1 3 t_n}}} = \frac{\sum_{k = 0}^n e^{\beta_1 \left( t_k - t_n \right)}}{\sum_{k = 0}^n e^{\beta_1 \left( t_k - 2 t_n \right)}}$ which is numerically well-behaved. – crow Jan 30 '13 at 22:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.