I am trying to understand why the formula
$$ \frac{\log(1+x)}{(1+x)-1} \times x,$$
which simply reduces down to $\log(1+x)$, is considered as more stable to compute than $\log(1+x)$. In my head it doesn't make sense to me as my brain automatically simplifies it to $\log(1+x)$, which I am guessing a computer doesn't do, but then why does adding in "extra" calculations make it more stable for the computer? My intuition would have been the opposite, the more calculations performed, the more error is introduced. Why is this not the case here?