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

NAME

6       expm1, expm1f, expm1l - exponential minus 1
7

SYNOPSIS

9       #include <math.h>
10
11       double expm1(double x);
12       float expm1f(float x);
13       long double expm1l(long double x);
14
15       Link with -lm.
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       expm1(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 ||
20       _ISOC99_SOURCE; or cc -std=c99
21       expm1f(), expm1l(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600
22       || _ISOC99_SOURCE; or cc -std=c99
23

DESCRIPTION

25       expm1(x) returns a value equivalent to
26
27           exp(x) - 1
28
29       It is computed in a way that is accurate even if the value of x is near
30       zero—a case where exp(x) - 1 would be inaccurate due to subtraction  of
31       two numbers that are nearly equal.
32

RETURN VALUE

34       On success, these functions return exp(x) - 1.
35
36       If x is a NaN, a NaN is returned.
37
38       If x is +0 (-0), +0 (-0) is returned.
39
40       If x is positive infinity, positive infinity is returned.
41
42       If x is negative infinity, -1 is returned.
43
44       If the result overflows, a range error occurs, and the functions return
45       -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.
46

ERRORS

48       See math_error(7) for information on how to determine whether an  error
49       has occurred when calling these functions.
50
51       The following errors can occur:
52
53       Range error, overflow
54              An overflow floating-point exception (FE_OVERFLOW) is raised.
55
56       These functions do not set errno.
57

CONFORMING TO

59       C99, POSIX.1-2001.
60

BUGS

62       For  some large negative x values (where the function result approaches
63       -1), expm1() raises a bogus underflow floating-point exception.
64
65       For some large positive x values, expm1() raises a bogus invalid float‐
66       ing-point exception in addition to the expected overflow exception, and
67       returns a NaN instead of positive infinity.
68

SEE ALSO

70       exp(3), log(3), log1p(3)
71

COLOPHON

73       This page is part of release 3.22 of the Linux  man-pages  project.   A
74       description  of  the project, and information about reporting bugs, can
75       be found at http://www.kernel.org/doc/man-pages/.
76
77
78
79                                  2008-08-05                          EXPM1(3)
Impressum