![]() |
![]() |
![]() |
Log(1+x)
#include <math.h> double log1p ( double x ); float log1pf ( float x );
libm
The log1p() and log1pf() functions compute the value of log(1+x), where x > -1.0.
If x is: | log1p() returns: |
---|---|
NAN | NAN |
x < -1.0 | -HUGE_VAL, or NAN (errno is set to EDOM). |
x = -1.0 | -HUGE_VAL (errno may be set to ERANGE). |
log1p() is standard Unix; log1pf() is ANSI (draft)
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
ilogb(), log(), logb(), log10()
![]() |
![]() |
![]() |