cpp/numeric/math/log1p

@1-3@ Computes the of. This function is more precise than the expression if  is close to zero. @A@ Additional overloads are provided for all integer types, which are treated as.

Return value
If no errors occur $ln(1+num)$ is returned.

If a domain error occurs, an implementation-defined value is returned (NaN where supported).

If a pole error occurs, huge_val,, or is returned.

If a range error occurs due to underflow, the correct result (after rounding) is returned.

Error handling
Errors are reported as specified in math_errhandling.

Domain error occurs if is less than $-1$.

Pole error may occur if is $-1$.

If the implementation supports IEEE floating-point arithmetic (IEC 60559),
 * If the argument is ±0, it is returned unmodified
 * If the argument is -1, -∞ is returned and fe_divbyzero is raised
 * If the argument is less than -1, NaN is returned and fe_invalid is raised
 * If the argument is +∞, +∞ is returned
 * If the argument is NaN, NaN is returned