[Previous] [Contents] [Next]

log1p(), log1pf()

Log(1+x)

Synopsis:

#include <math.h>

double log1p ( double x );

float log1pf ( float x );

Library:

libm

Description:

The log1p() and log1pf() functions compute the value of log(1+x), where x > -1.0.

Returns:

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).

Classification:

log1p() is standard Unix; log1pf() is ANSI (draft)

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

ilogb(), log(), logb(), log10()


[Previous] [Contents] [Next]