`log1p`

, `log1pf`

---log of `1 + ``x`

#include <math.h> double log1p(doublex); float log1pf(floatx);

**Description**

`log1p`

calculates
the natural logarithm of `1+`

. You can use `x``log1p`

rather
than ``log(1+`

' for greater precision when `x`)`x` is very
small.

`log1pf`

calculates the same thing, but accepts and returns
`float`

values rather than `double`

.

**Returns**

`log1p`

returns a `double`

, the natural log of `1+`

.
`x``log1pf`

returns a `float`

, the natural log of `1+`

.
`x`

**Portability**

Neither `log1p`

nor `log1pf`

is required by ANSI C or by the System V
Interface Definition (Issue 2).

Go to the first, previous, next, last section, table of contents.