The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

log1p - compute a natural logarithm

 SYNOPSIS



#include <math.h>

double log1p (double x);

 DESCRIPTION

The log1p() function computes loge(1.0 + x). The value of x must be greater than -1.0.

 RETURN VALUE

Upon successful completion, log1p() returns the natural logarithm of 1.0 + x.

If x is NaN, log1p() returns NaN and may set errno to [EDOM].

If x is less than -1.0, log1p() returns -HUGE_VAL or NaN and sets errno to [EDOM].

If x is -1.0, log1p() returns -HUGE_VAL and may set errno to [ERANGE].

 ERRORS

The log1p() function will fail if:
[EDOM]
The value of x is less than -1.0.

The log1p() function may fail and set errno to:

[EDOM]
The value of x is NaN.
[ERANGE]
The value of x is -1.0.

No other errors will occur.

 EXAMPLES

None.

 APPLICATION USAGE

None.

 FUTURE DIRECTIONS

None.

 SEE ALSO

log(), <math.h>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]