I got this doubt after some difficult in programming. In a part of code, i had to calculate:
$$ x = 0 * \log(0) \\ x = 0*(-\infty) $$
and got $x = NaN$ (in R and Matlab). So I changed my computations to $x = Log(0^0)$ and got $x=0$.
I found this question/asnwer about $0*\infty$ getting NaN. But, why the 'log way' does have a result?
remember that $0^0=1$ so $\log(0^0)=\log(1)=0$. On the other hand $\log(0) = $ undefined and thus so is $0 \log(0)$