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


log1p

Syntax

#include <math.h>

double log1p(double x);

Description

This function computes the natural logarithm of 1 + x. It is more accurate than `log(1 + x)' for small values of x.

Return Value

The natural logarithm of 1 + x. If x is -1, a negative infinity is returned and errno is set to ERANGE. If x is less than -1 or +Inf or a NaN, the return value is NaN and errno is set to EDOM.

Portability

not ANSI, not POSIX


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