SYNOPSIS
#include <math.h>
double log1p(double x);
float log1pf(float x);
DESCRIPTION
log1p
calculates ln(1+x),
the natural logarithm of 1+x.
You can use log1p
rather than log(1+x)
for greater precision when 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.
COMPLIANCE
Neither log1p
nor log1pf
is required by ANSI C or by the System
V Interface Definition (Issue 2).