Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ log1p() [4/7]

double stan::math::log1p ( double  x)
inline

Return the natural logarithm of one plus the specified value.

\[ \mbox{log1p}(x) = \log(1 + x) \]

This version is more stable for arguments near zero than the direct definition. If x == -1, log1p(x) is defined to be negative infinity.

Parameters
[in]xArgument.
Returns
Natural log of one plus the argument.
Exceptions
std::domain_errorIf argument is less than -1.

Definition at line 29 of file log1p.hpp.