Log1p
Log1p is a mathematical function that returns the natural logarithm of 1 plus its argument, log1p(x) = log(1+x). It provides higher numerical stability than a direct evaluation of log(1+x) for values of x near zero, where cancellation and loss of precision can occur in finite-precision arithmetic.
Domain and behavior: The function is defined for x > -1; at x = 0, log1p(0) = 0. As
Computational aspects: Implementations use special algorithms, such as series expansions around 0, range reduction, and rational
Language support and usage: log1p is part of the C standard library (log1p in <math.h> with several