The stability of log(1+x)
Consider the case that x is small. (1 + x) has a rounding error; the result that you get is not (1 + x) but (1 + x') for some x' close to x. If x is very small, the relative difference between x' and x can be quite large. Trying to calculate log (1 + x) will calculate log (1 + x') which can have a large relative error. Instead the better formula calculates log (1 + x') / x' * x. 

You can just enter both formulas into a spreadsheet and compare with the Taylor polynomial ln (1 + x) = $x - x^2/2 + x^3/3 - x^4/4...$. 

Note that it is easy to calculate ln (z) with very high precision when z is close to 1. The damage is done when 1+x is calculated with a small absolute rounding error which turns into a huge relative error, and that's what the modified formula compensates for.