Purpose of `numpy.log1p( )`?
The NumPy docs give a hint: For real-valued input, log1p is accurate also for x so small that 1 + x == 1 in floating-point accuracy. So for example let’s add a tiny non-zero number and 1.0. Rounding errors make it a 1.0. If we try to take the log of that incorrect sum, we get an incorrect result (compare to WolframAlpha): But if we use log1p(), we … Read more