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.