Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

log1p, log1pf, log1pl - compute natural logarithm

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double log1p(double x);
C11
float log1pf(float x);
long double log1pl(long double x); (End)

Description

These functions compute loge (1.0 + x), where x must be greater than -1.0.

Return val.

ln(1.0 + x)

if successful.

 

-HUGE_VAL
-HUGE_VALF
-HUGE_VALL

depending on the function type, if x is less than or equal to -1.
errno is set to indicate the error.

Errors

log1p(), log1pf() and log1pl() will fail if: 

 

EDOM

The value of x is less than -1.0.

See also

log()math.h.