1LOG1P(3)                   Linux Programmer's Manual                  LOG1P(3)
2
3
4

NAME

6       log1p, log1pf, log1pl -  logarithm of 1 plus argument
7

SYNOPSIS

9       #include <math.h>
10
11       double log1p(double x);
12       float log1pf(float x);
13       long double log1pl(long double x);
14
15       Link with -lm.
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       log1p():
20           _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 ||
21           _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE ||
22           _POSIX_C_SOURCE >= 200112L;
23           or cc -std=c99
24       log1pf(), log1pl():
25           _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
26           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
27           or cc -std=c99
28

DESCRIPTION

30       log1p(x) returns a value equivalent to
31
32           log (1 + x)
33
34       It is computed in a way that is accurate even if the value of x is near
35       zero.
36

RETURN VALUE

38       On success, these functions return the natural logarithm of (1 + x).
39
40       If x is a NaN, a NaN is returned.
41
42       If x is positive infinity, positive infinity is returned.
43
44       If  x  is  -1, a pole error occurs, and the functions return -HUGE_VAL,
45       -HUGE_VALF, or -HUGE_VALL, respectively.
46
47       If x is less than -1 (including  negative  infinity),  a  domain  error
48       occurs, and a NaN (not a number) is returned.
49

ERRORS

51       See  math_error(7) for information on how to determine whether an error
52       has occurred when calling these functions.
53
54       The following errors can occur:
55
56       Domain error: x is less than -1
57              An invalid floating-point exception (FE_INVALID) is raised.
58
59       Pole error: x is -1
60              A  divide-by-zero  floating-point  exception  (FE_DIVBYZERO)  is
61              raised.
62
63       These functions do not set errno.
64

CONFORMING TO

66       C99, POSIX.1-2001.
67

SEE ALSO

69       exp(3), expm1(3), log(3)
70

COLOPHON

72       This  page  is  part of release 3.53 of the Linux man-pages project.  A
73       description of the project, and information about reporting  bugs,  can
74       be found at http://www.kernel.org/doc/man-pages/.
75
76
77
78                                  2010-09-20                          LOG1P(3)
Impressum