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():
20           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
21               || _XOPEN_SOURCE >= 500
22               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
23               || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
24       expm1f(), expm1l():
25           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
26               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
27               || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
28

DESCRIPTION

30       These functions return a value equivalent to
31
32           exp(x) - 1
33
34       The result is computed in a way that is accurate even if the value of x
35       is near zero—a case where exp(x) - 1 would be inaccurate  due  to  sub‐
36       traction of two numbers that are nearly equal.
37

RETURN VALUE

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

ERRORS

53       See math_error(7) for information on how to determine whether an  error
54       has occurred when calling these functions.
55
56       The following errors can occur:
57
58       Range error, overflow
59              errno  is  set  to ERANGE (but see BUGS).  An overflow floating-
60              point exception (FE_OVERFLOW) is raised.
61

ATTRIBUTES

63       For  an  explanation  of  the  terms  used   in   this   section,   see
64       attributes(7).
65
66       ┌────────────────────────────┬───────────────┬─────────┐
67Interface                   Attribute     Value   
68       ├────────────────────────────┼───────────────┼─────────┤
69expm1(), expm1f(), expm1l() │ Thread safety │ MT-Safe │
70       └────────────────────────────┴───────────────┴─────────┘

CONFORMING TO

72       C99, POSIX.1-2001, POSIX.1-2008.
73

BUGS

75       For  some large negative x values (where the function result approaches
76       -1), expm1() raises a bogus underflow floating-point exception.
77
78       For some large positive x values, expm1() raises a bogus invalid float‐
79       ing-point exception in addition to the expected overflow exception, and
80       returns a NaN instead of positive infinity.
81
82       Before version 2.11, the glibc implementation  did  not  set  errno  to
83       ERANGE when a range error occurred.
84

SEE ALSO

86       exp(3), log(3), log1p(3)
87

COLOPHON

89       This  page  is  part of release 5.02 of the Linux man-pages project.  A
90       description of the project, information about reporting bugs,  and  the
91       latest     version     of     this    page,    can    be    found    at
92       https://www.kernel.org/doc/man-pages/.
93
94
95
96                                  2017-09-15                          EXPM1(3)
Impressum