0
$\begingroup$

I have an expression like this

$$\sum_i^n\log\frac{x_i}{y_i}+\alpha\sum_i^nx_i\log\frac{x_i}{\beta}$$

A potential problem is that $x_i$ and $y_i$ may take value $0$ for certain $i$, hence making $\displaystyle\log\frac{x_i}{y_i}$ and $\displaystyle\log\frac{x_i}{\beta}$ undefined.

I wonder if there is any way of transform the expression to avoid this such that the resulting expression may only deviate from the original for an arbitrarily small amount.

  • 0
    It is the usual convention that $\log 0=-\infty, \log(a/0)=+\infty$, and $0.(\pm \infty)=0$2012-01-05
  • 0
    @Ashok, resulting $-\infty$ or $+\infty$ from the expression above is meaningless in my case, so I would like to avoid them as well.2012-01-06

2 Answers 2