log(1 + x) - x, accurate for small |x| (where log1p(x) - x would cancel). Not an R function. R has it only in its C API (Rmath.h), as log1pmx.
log1pmx
A number >= -1.
log(1 + x) - x; -Infinity at x = -1 and x = Infinity, NaN for x < -1.
-Infinity
NaN
log1pmx(1e-5); // -4.9999666669166655e-11 Copy
log1pmx(1e-5); // -4.9999666669166655e-11
log(1 + x) - x, accurate for small |x| (where log1p(x) - x would cancel). Not an R function. R has it only in its C API (Rmath.h), as
log1pmx.